Question: Write a program that starts a player off with a bank of $ 1 5 . 0 0 . A coin is flipped and randomly
Write a program that starts a player off with a bank of $ A coin is flipped and randomly lands on heads or tails. The user will guess heads or tails. If the coin flip matches the player's guess his bet will be doubled. It costs dollar to play and the program will bet that amount automatically each time as long as there is the available bank amount.
You should be using plenty of functions, random numbers, decision statements, loops, variables, and io manipulation at a minimum.
At the end of the game, ask the user if she wishes to play again and loop the game. Keep looping until the bank reaches or the user inputs n to quit playing.
NOTE I added a BEGIN file as an attachment to get you started. This is just one possible design. Many others exist. Feel free to complete this design or modify it to make it your own.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
