Question: To do: Write a program named MatchEm that generate three random numbers between 0 and 4. Determine how many matched (zero, one, or two).
To do: Write a program named MatchEm that generate three random numbers between 0 and 4. Determine how many matched (zero, one, or two). List the numbers next to each other and print out how many matched. Add a loop that does this process 20 times. After the loop, print out how many times there were zero matches, how many times there was one match, and how many times all three matched. Alter your program so that the user can place a bet for each game. (They fill this in once - they bet the same amount for each run). If there are zero matches, they lose twice that amount of money. If there is one match, they gain twice that amount of money. And if all three numbers match, they triple their bet. After each run, indicate how much was won for that run and the current amount of money won or lost for the match.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
