Question: PYTHON Only!!!! The program will simulate spinning a wheel that has been numbered 1 through 16 . Not only is the wheel numbered, but it

PYTHON Only!!!!

PYTHON Only!!!! The program will simulate spinning a wheel that has been

The program will simulate spinning a wheel that has been numbered 1 through 16 . Not only is the wheel numbered, but it also has colors and a designated jackpot value. Each time the wheel is spun, the number is output along with either the color or label for the number: - The number 16 on the wheel indicates a Jackpot. - Otherwise, it is represented by a color: - If the number divides by 3 exactly, the color is Green. - If the number divided by 3 has a remainder of 1 , the color is Yellow. - If the number divided by 3 has a remainder of 2 , the color is Red. When the program starts, it will ask the user how many time to spin the wheel. The user must enter a number between 4 and 10 . Then the program will simulate spinning the wheel that number of times. The program should have TWO functions: main - This function is the main routine. It should do the following: - Ask the user how many times they want to spin the whell, If the user enters a number less than 4 or greater than 10 , the program should continue to ask the user for a valid number between 4 and 10 . - Remember you can use a while loop to do input validation. - Once the program has a valid number from the user, it should use that number as an argument when calling the spid, iheel function. spins wheen - This function has one parameter, spins, which is the number of times to spin the wheel. - Use a for loop to spin the wheel the number of times specified. - Use the randint function from the random module to get a random digit between 1 and 16 inclusive. - Print the number of the loop iteration and the spin value as indicated in the Sample Output. - The number of the loop iteration should start with 1. - The spin value should include the number and either the color of the number or "JACKPOT!" in the case of number 16. - After the for loop is complete, print a message thanking the user for playing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!