Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON This assignment requires you to randomly choose a number, accept input from the user, and print whether or not the user is correct. Randomly
PYTHON
This assignment requires you to randomly choose a number, accept input from the user, and print whether or not the user is correct.
Randomly choose a (whole) number between 1 and 256 without showing it to the user.
Prompt the user for the word "odd" or "even".
Print an appropriate message depending on whether they guessed correctly.
If they don't enter "odd" or "even", print an error message.
This assignment requires you to randomly choose a number, accept input from the user, and print whether or not the user is correct. - Randomly choose a (whole) number between 1 and 256 without showing it to the user. - Prompt the user for the word "odd" or "even". - Print an appropriate message depending on whether they guessed correctly. - If they don't enter "odd" or "even", print an error message. Submit your file as oddeven.py. Sample Run 1 I'm thinking of a number. Is it odd or even? even My number was 73 . Sorry! Sample Run 2 I'm thinking of a number. Is it odd or even? odd My number was 53 . Well doneStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started