Question: Using Python Coding. Picture is included to clear any confusion. Thanks Techniques used will be object - oriented programming, structured programming, top - down coding.
Using Python Coding. Picture is included to clear any confusion. Thanks
Techniques used will be objectoriented programming, structured programming, topdown coding.
Produce tested code that executes correctly and consistently.
Include comments and explanations of the structures used in the program eg Repetition, Decision, Lists etc. inside the program.
Debug program issues before submitting.
Be ready to explain ANY of the code you have used
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.HAZARP DICE CAME
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 lay 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
