Question: 5 . In main: a ) Print two blank lines followed by the title of the game: Pig Dice b ) Ask the user to

5. In main:
a) Print two blank lines followed by the title of the game:
Pig Dice
b) Ask the user to enter the first players name with this prompt:
Enter name for player 1:
c) Ask the user to enter the second players name with this prompt:
Enter name for player 2:
d) Print a greeting message in the following form:
Hello Ziggy and Elmer, welcome to Pig Dice!
Put a tab to the left of Hello.
e) Initialize the players scores to 0.
f) Print their scores using the print_scores function.
g) Enter a while loop in which repeats the following steps:
Call the play_turn function for player 1 and add any earned points to his/her total
score.
Print the players scores (use the appropriate function).
Check whether player 1 won the game (use the appropriate function).
If player 1 didnt win, call the play_turn function for player 2 and add any earned
points to his/her total.
Print the players scores.
Check whether player 2 won the game.
If either player won the game, ensure that you exit the while loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!