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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here