3.9. Roulette Wheel Colors – Python

Learn Roulette Video Source & Info:

—————————————————————————————————–
Starting out with Python, Third Edition, Tony Gaddis
Chapter 3
Programming Challenges
——————————————————————————————————————————————————————–
9. Roulette Wheel Colors

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 10, the odd-numbered pockets are red and the even-numbered pockets are black.
– For pockets 11 through 18, the odd-numbered pockets are black and the even-numbered pockets are red.
– For pockets 19 through 28, the odd-numbered pockets are red and the even-numbered pockets are black.
– For pockets 29 through 36, the odd-numbered pockets are black and the even-numbered pockets are red.

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 36.

Starting out with Python. Third Edition. Tony Gaddis.
——————————————————————————————————————————————————————–
Bitcoin Address – 1AbnaHDLG3xqmycNHKDKh1gPNst29Rkp6S

Thanks 🙂
——————————————————————————————————————————————————————–

Source: YouTube

Share this video:
3.9. Roulette Wheel Colors – Python

4 thoughts on “3.9. Roulette Wheel Colors – Python

  1. you helped me understand the concepts really well thanks for this video!!

  2. This is really helpful and I really appreciate these videos 🙂 Having this course and using this book during my class now 🙂

Comments are closed.