Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

On a roulette wheel, the pockets are numbered from 0 to 3 6 . The colors of the pockets are as follows: Pocket 0 is

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
The even- numbered pockets are black
For pockets 11 through 18
The odd-numbered pockets are black
The even- numbered pockets are red
For pockets 19 through 28
The odd-numbered pockets are red
The even- numbered pockets are black
For pockets 29 through 36
The odd-numbered pockets are black
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.
Note
Input Validation - The program should display an error message if the user enters a number that is outside the range of 0 through 36.
Output Samples
Output Samples
The Text version of the Output samples for the Roulette Wheel Program.
Grading Rubric
roulette.py
Documentation & IPO Chart
20
Input
10
Validation
10
Decision Structures
Odd/Even
20
Pocket Color
30
Output
10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

Students also viewed these Databases questions

Question

Select suitable tools to analyze service problems.

Answered: 1 week ago