Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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 done

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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions