Question: please help! 12:54 Back Assignment Details CSIT 104.08FA22 PYTHON PROGRAMMINGI Description In the game of Lucky Sevens, the player rolls a pair of dice. If

please help!
please help! 12:54 Back Assignment Details CSIT 104.08FA22 PYTHON PROGRAMMINGI Description In
the game of Lucky Sevens, the player rolls a pair of dice.

12:54 Back Assignment Details CSIT 104.08FA22 PYTHON PROGRAMMINGI Description In the game of Lucky Sevens, the player rolls a pair of dice. If the dots add up to 7 , the player wins $4; otherwise, the player loses $1. Suppose that, to entice the gullible, a casino tells players that there are lots of ways to win: (1,6),(2,5), and so on. A little mathematical analysis reveals that there are not enough ways to win to make the game worthwhile; however, because many people's eyes glaze over at the first mention of mathematics, your challenge is to write a program that demonstrates the futility of playing the game. Your program should take as input the amount of money that the player wants to put into the pot, and using a random number generator play the game until the pot is empty. At that point, the program should print: 1. The number of rolls it took to break the player 2. The maximum amount of money in the pot. How many dollars do you have? 50 You are broke after 220 rolls. You should have quit after 6 rolls when you Submit Assignment 12:54 $4, else lose $1 2. The input is: the amount of money the user is prepared to lose 3. Computations: use a random number generator to simulate rolling the dice loop until the funds are depleted count the number of rolls keep track of the maximum amount 4. The outputs are: the number of rolls it takes to deplete the funds Submit Assignment

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!