Question: Using Python Coding. create this program and explain each function of coding. Part A Rules: At the start of each game, the player specifies a

Using Python Coding. create this program and explain each function of coding.
Part A
Rules: At the start of each game, the player specifies a number between 5 and 9 inclusive
this is called the main. The player then throws two dice.
If the main is rolled, the player wins
If a 2 or a 3 is rolled, the player loses
If an 11 or 12 is rolled, the result depends on the main:
With a main of 5 or 9, the player loses
With a main of 6 or 8, the player loses with an 11, but wins with a 12
With a main of 7, the player wins with an 11, but loses with a 12
If any other number is rolled, then this is called the chance.
The player throws the dice again:
If the chance is rolled, the player wins
If the main is rolled, the player loses
The player keeps rolling until they roll either the chance or the main
The first part of this assignment is to implement the code for one game.
Part B Additional Features
Game Loop Provide the ability for the user to play more than one game.
Suggestion: Initialize a variable called play at the top of your program. You could
initialize it to a Boolean value or a string. If you do this, then the pseudo code for your
game loop could look something like this:
while play is equal to whatever you set it to
All the code from Part A
At the very bottom of the loop ... Ask the user if they want to play again
If they do not, then set play to what you need it to be
Otherwise, let the game loop to start again
NOTE: At the start of each game, the user must be told which game they are on
(ie, Game 1... Game 10... Game 50).
Game Playability Make your game user-friendly and playable. You need to decide what
the interaction with the user will look like. There needs to be significant effort put in trying
to make the game look nice spacing, underlining, clear messaging etc.
Farewell Message When the player decides to not play again, give a final report that
includes the total number of games won and the total number of games lost.

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 Databases Questions!