Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 and inclusive
this is called the main. The player then throws two dice.
If the main is rolled, the player wins
If a or a is rolled, the player loses
If an or is rolled, the result depends on the main:
With a main of or the player loses
With a main of or the player loses with an but wins with a
With a main of the player wins with an but loses with a
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 Game Game
Game Playability Make your game userfriendly 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started