The cost and payout of each spin is as follows: Jackpot will payout $50. Green will...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The cost and payout of each spin is as follows: Jackpot will payout $50. Green will payout $20. • Red will cost the player $25. Yellow will neither win nor lose. • In the main function, ask the user how many time to spin the wheel. The program should only allow the user to enter numbers between 4 and 10 inclusive. • After asking the user for the number of spins, the program (in the main function) should then ask the user how much money they are betting. • Modify the spin thest function to take an additional parameter, pot, which will indicate the amount of money the user is betting. Use that parameter in the appropriate place in your function to initialize a variable to keep track of how much money the user is winning or losing. Before spinning the wheel, print a message to let them know their money has been deposited with the bank. • At the end of the spin wheel, function, a message should be printed to indicate the state of the player's winnings: If the user has a positive amount, the message should read: "Collect $xx.xx.at the cashier's window." If the user has no money left ($0), the message should read: "All the money is gone." o If the user has a negative amount, the message should read: "You owe $xx.xx to the bank!" Note the number should be shown as a positive amount so if the amount is -20.0 the message should say they owe $20.00. Sample Output: How many times do you want to spin the wheel? 8 How much money are you betting? 75 $75.00 has been deposited with the bank. Spin 1: 9 --> Green You win $20! Spin 2: 9 > Green. You win $20! Spin 3: 8 -> Red You lose $25! Spin 4: 5==> Red You lose $25! Spin 5: 9=> Green You win $20! Spin 6: 3 => Green You win $20! Spin 7: 14 -> Red You lose $25! Spin 8: 16 => JACKPOT! You win $50! Collect $130.00 at the cashier's window. Thanks for playing! The cost and payout of each spin is as follows: Jackpot will payout $50. Green will payout $20. • Red will cost the player $25. Yellow will neither win nor lose. • In the main function, ask the user how many time to spin the wheel. The program should only allow the user to enter numbers between 4 and 10 inclusive. • After asking the user for the number of spins, the program (in the main function) should then ask the user how much money they are betting. • Modify the spin thest function to take an additional parameter, pot, which will indicate the amount of money the user is betting. Use that parameter in the appropriate place in your function to initialize a variable to keep track of how much money the user is winning or losing. Before spinning the wheel, print a message to let them know their money has been deposited with the bank. • At the end of the spin wheel, function, a message should be printed to indicate the state of the player's winnings: If the user has a positive amount, the message should read: "Collect $xx.xx.at the cashier's window." If the user has no money left ($0), the message should read: "All the money is gone." o If the user has a negative amount, the message should read: "You owe $xx.xx to the bank!" Note the number should be shown as a positive amount so if the amount is -20.0 the message should say they owe $20.00. Sample Output: How many times do you want to spin the wheel? 8 How much money are you betting? 75 $75.00 has been deposited with the bank. Spin 1: 9 --> Green You win $20! Spin 2: 9 > Green. You win $20! Spin 3: 8 -> Red You lose $25! Spin 4: 5==> Red You lose $25! Spin 5: 9=> Green You win $20! Spin 6: 3 => Green You win $20! Spin 7: 14 -> Red You lose $25! Spin 8: 16 => JACKPOT! You win $50! Collect $130.00 at the cashier's window. Thanks for playing!
Expert Answer:
Related Book For
Data Analysis and Decision Making
ISBN: 978-0538476126
4th edition
Authors: Christian Albright, Wayne Winston, Christopher Zappe
Posted Date:
Students also viewed these programming questions
-
Our experiences of trauma influence our identity. How has trauma and adversity impacted how you understand yourself and connect to others? How has it influenced your worldview?Please note, I am not...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
In 2022, Tornado Ltd. had average inventory of $92000. The 2022 income statement showed net sales of $2100000 and gross profit of $428000. In 2021, it was taking the company approximately 30 days to...
-
Purchase Commitments at December 31, 2011, Volkan Company has outstanding non-cancelable purchase commitments for 40,000 gallons, at $3.00 per gallon, of raw material to be used in its manufacturing...
-
DS 1 1.2.3 gives a data set of brightness measurements for b = 7 batches of kaolin processed through k = 3 calciners. The calciner operators are interested in whether their calciners are operating at...
-
You run at \(4 \mathrm{~m} / \mathrm{s}\) in the same direction as a river flowing at \(2 \mathrm{~m} / \mathrm{s}\). This speed is enough to keep you chatting with your friend who is steering a slow...
-
On June 30, 2014, Plaster, Inc., paid $916,000 for 80 percent of Stucco Companys outstanding stock. Plaster assessed the acquisition-date fair value of the 20 percent noncontrolling interest at...
-
24. A water jet whose cross section area is a striker wall making an angle e with the normal and rebounds elastically. The velocity of water of density d is v. Force exerted on wall is :- 0 (1) 2avd...
-
Problem 9 (50 Points) An air-cooled aluminum heat sink is used to keep electronics cool (see image and diagram). The cooling requirements are being significantly increased. To increase the rate of...
-
Evaluate: 1 So x+1 dx -1x3dx
-
The management of Bank EZ repurchases its own bonds in the open market. They pay 6.5 million for bonds with a face value of 10.0 million and a carrying value of 9.8 million. The bank will most likely...
-
CROCO S.p.A. sells an intangible asset with a historical acquisition cost of 12 million and an accumulated depreciation of 2 million and reports a loss on the sale of 3.2 million. Which of the...
-
Jordans response about the impact of the different depreciation methods on net profit margin is most likely incorrect with respect to: A. accelerated depreciation. B. straight-line depreciation. C....
-
Fairmont Golf issued fixed rate debt when interest rates were 6 percent. Rates have since risen to 7 percent. Using only the carrying amount (based on historical cost) reported on the balance sheet...
-
Jordans response about the effect of Alphas revaluation is most likely correct with respect to the impact on its: A. return on equity. B. return on assets. C. debt to capital ratio. Brian Jordan is...
-
3) Garnet typically has the chemical formula: (Fe+, Mg+, Ca+, Mn+)3 AP2Si** 3012 The formula can be broken up into structural sites (spaces where cations of a certain size range can occupy) X3Y2Z3012...
-
Let X be a random variable taking on values a1, a2, . . . , pr with probabilities p1, p2, . . . , pr and with E(X) = μ. Define the spread of X as follows: This, like the standard deviation, is a...
-
As indicated by the algebraic formulation of the Pigskin model, there is no real need to calculate inventory on hand after production and constrain it to be greater than or equal to demand. An...
-
Based on Bean et al. (1987). Boris Milkems firm owns six assets. The expected selling price (in millions of dollars) for each asset is given in the file S14_89.xlsx. For example, if asset 1 is sold...
-
A city in Ohio is considering replacing its fleet of gasoline-powered automobiles with electric cars. The manufacturer of the electric cars claims that this municipality will experience significant...
-
How many oxygen atoms are bonded to the carbon of the carbonyl of an ester functional group? (a) none (b) one (c) two (d) three
-
Which would you expect to be more viscousa polymer made of long molecular strands or a polymer made of short molecular stands? Why? (a) long strands, because they tend to tangle among themselves (b)...
-
Explain why caprylic acid, CH 3 (CH 2 ) 6 COOH, dissolves in a 5, aqueous solution of sodium hydroxide but caprylaldehyde, CH 3 (CH 2 ) 6 CHO, does not dissolve. (a) With two oxygens, the caprylic...
Study smarter with the SolutionInn App