Use Python to write a program that asks the user to enter a pocket number and displays whether the pocket is green, red, or black. The program should display an error message if the user enters a number that is outside the range of 0 through 56. On a roulette wheel, the pockets are numbered from 0 to 36. The colors of the pockets are as follows: Pocket 0 is green. For pockets 1 through 20, the odd-numbered pockets are red and the even-numbered pockets are black. For pockets 21 through 38, the odd-numbered pockets are black and the even-numbered pockets are red. For pockets 39 through 48, the odd-numbered pockets are red and the even-numbered pockets are black. For pockets 49 through 56, the odd-numbered pockets are black and the even-numbered pockets are red
Use Python to write a program that asks the user to enter a pocket number and displays whether the pocket is green, red, or black. The program should display an error message if the user enters a number that is outside the range of 0 through 56.
On a roulette wheel, the pockets are numbered from 0 to 36. The colors of the pockets are as follows:
Pocket 0 is green.
For pockets 1 through 20, the odd-numbered pockets are red and the even-numbered pockets are black.
For pockets 21 through 38, the odd-numbered pockets are black and the even-numbered pockets are red.
For pockets 39 through 48, the odd-numbered pockets are red and the even-numbered pockets are black.
For pockets 49 through 56, the odd-numbered pockets are black and the even-numbered pockets are red.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images