diff --git a/README.md b/README.md index 45aa284..b217369 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ assignment_ruby_warmup ====================== + + +James Biddle + Dice, dice, baby. [A Ruby assignment from the Viking Codes School](http://www.vikingcodeschool.com) diff --git a/rolling_dice.rb b/rolling_dice.rb new file mode 100644 index 0000000..8cfd264 --- /dev/null +++ b/rolling_dice.rb @@ -0,0 +1,25 @@ +def roll_dice(n) + + + total = 1 + + n.times do |d| + total += rand(1..6) + end + puts total +end + + + +roll_dice(6) + +=begin + +roll_dice(4) + +total = 0 +n.times do + total += rand(1..6) +end + +=end \ No newline at end of file