n the casino 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...

1 answer below »

n the casino 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. So...



Write a computer version of Lucky Sevens game!


Your program should take as input the amount of money that the player wants to put into the pot.


The game starts with a player pressing any key on a computer keyboard.


After each roll, the program should:


a. Check if the dots add up to 7: if yes, the player wins $4; otherwise, the player loses $1;


b. Notify the player about loosing or winning money on the roll;


c. On each winning roll, tell the player how many rolls it took this time to win since the last winning roll (or since the beginning of the game if this is the very first win);


d. Display the current amount of money in the pot.


d. Pause the game until a gamer presses any key on a computer keyboard.


The game should play until the pot is empty.


Once the pot is empty, the game should stop rolling dice, notify the gamer that no more money is left, and print the total number of rolls it took to break the player (total amount of rolls since the beginning).


i need a py file



Have fun!

Answered 2 days AfterMay 03, 2021

Answer To: n the casino game of Lucky Sevens, the player rolls a pair of dice. If the dots add up to 7, the...

Aditya answered on May 05 2021
138 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here