Question: Use python 3.5 version. Write a program that allows the user to play and study the game of craps define player and die classes player
Use python 3.5 version.
Write a program that allows the user to play and study the game of craps
define player and die classes
player class must have __init__, __str__, play(this method plays the game and return True if there is a win, False otherwise), getnumberofrolls(this method returns the number of rolls)
die class must have __init__, __str__, roll( this method resets the die's value to a random number between 1 and 6), getvalue( this method returns the die's value)
With those two classes, make two more functions.
one that only plays one round of game, and other that plays n number of games(for example 1000 rounds of games).
the manygames functions most show the total number of wins and losses. the average number of rolls per win and the average number of rolls per loss, and finally the winning percentage.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
