Modify Dice Doubles so that it uses at least
two functions. (Well, technically three, since
main() is a function.)
rollDice()should pick a random number from 1 to 6 and return it. It doesn't need any parameters.
ending()should print some sort of ending message. It doesn't need parameters and shouldn't return anything.
DICE BLOWOUT WITH FUNCTIONS! Roll #1: 3 Roll #2: 5 The total is 8! Roll #1: 6 Roll #2: 1 The total is 7! Roll #1: 2 Roll #2: 5 The total is 7! Roll #1: 1 Roll #2: 1 The total is 2! You got doubles! [some sort of ending] This is the end, beautiful friend. This is the end, my only friend. The end of everything that stands, The end of our elaborate plans. This is the way the dice blowout ends; not with a bang but a whimper.
©2013 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.