due October 28th
The purpose of this assignment is to give you practice using loop statements, if ... and if ... else statements, practice writing functions, and program planning and development.
You are to write a dice game for one player (the computer). The rules for the game are:
It is important that you break the program down into smaller parts, so your planning is quite important. Study the sample output below to make sure you understand the logic of the game.
This is your turn #1 * You rolled 6 and 6. That's 12 * You rolled 5 and 5. That's 10 * You rolled 6 and 5. That's 11 ** You scored 33 points for this turn *** Your total is now 33 This is your turn #2 * You rolled 1 and 1. That's 2 * You rolled 5 and 3. That's 8 * You rolled 6 and 6. That's 12 ** You scored 22 points for this turn *** Your total is now 55 This is your turn #3 * You rolled 2 and 4. That's 6 * You rolled 2 and 6. That's 8 * You rolled 2 and 3. That's 5 ** You scored 19 points for this turn *** Your total is now 74 This is your turn #4 * You rolled 4 and 1. That's 5 * You rolled 4 and 1. That's 5 * You rolled 3 and 4. That's 0 ** You scored 10 points for this turn *** Your total is now 84 This is your turn #5 * You rolled 5 and 5. That's 10 * You rolled 4 and 3. That's 0 ** You scored 10 points for this turn *** Your total is now 94 This is your turn #6 * You rolled 3 and 6. That's 9 * You rolled 6 and 1. That's 0 ** You scored 9 points for this turn *** Your total is now 103 |