QCC Casino Royale offers its customers a happy way to go home with big bucks playing its “Dice” game. The Dice game is played by asking customers to roll a pair of dice. If customers roll a seven or 11, they win; any other roll and the customer loses. The odds of rolling a seven is 6 to 1 so that if customers bet 1 dollar and win, they receive 7 dollars. The odds of rolling an eleven are 18 to 1 so that if customers bet 1 dollar and win, they receive 19 dollars.
Upon entering the casino, customers must be greeted with an appropriate welcoming message. They must be asked to indicate the amount of money that is in their bankroll to play. Customers cannot enter the casino with a bankroll greater than $1,000. Customers must play the game in rounds of 10 plays and the minimum bet for each play is 5 dollars; the maximum bet is 50 dollars.
For each try at rolling the dice, customers must be asked how much they want to bet and for each try must be informed of the result and the changes to their bankroll. If customers lose all their money during the course of playing a round, they must be informed that they are busted and be told to leave the casino and go home. At the end of each round (10 Plays), customers must be asked if they want to continue playing or stop.
When customers are leaving the casino, they must be informed of how much money was lost or won, the amount they started with and the amount they are leaving with. They must also be given an appropriate departing message.
Hint:
To simulate rolling a pair of die (dice), the program must generate two random numbers. One random number must be generated for dice 1 and another random number must be generated for dice 2. The total roll is the sum of the two random numbers.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 7 images
Can this be done in python? I'm fairly new and struggling so I'm not able to convert this logic.
Can this be done in python? I'm fairly new and struggling so I'm not able to convert this logic.
- Q2: A mercury thermometer having a time constant of 0.1 min is placed temperature bath at 100°F and allowed to come to equilibrium with the bath. At time t= 0, the temperature of the bath begins to vary sinusoidally about its average temperature of 100°F with an amplitude of 2°F If the frequency of oscillation is 10/π cycles/min, What is the phase lag? In terms of the symbols used T = 0.1 <0 120 f = 10 元 s=100 x(t) = 100+ 2 sin(wt)) يسيفر نظارت دقت السائل SLOWarrow_forwardWrite a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get 21 or as close to 21 without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is declared. Otherwise,…arrow_forwardFlashback to Probability: Determine the odds of rolling TWO 6-sided dice, and getting a total between the two dice that is a multiple of three.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY