We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 110db34 commit cf6b971Copy full SHA for cf6b971
roller.rb
@@ -0,0 +1,10 @@
1
+def dice_roll(sides, num)
2
+
3
+ return rand(sides) * num
4
5
+end
6
7
+puts "Rolling 5 sided die"
8
+puts dice_roll(5,1)
9
+puts "Rolling 2 6 sided dice"
10
+puts dice_roll(6,2)
0 commit comments