Write a python script that accepts input

Python Problem

User input can be obtained using the following statement and storing it into a variable for future use:

num = input("Enter a number: ")

The Python shell will wait for the user to input a number and then continue forward with the next line in the script.

Write a Python script that accepts input until the user enters the number 999 to stop. Determine whether the user input is either an odd or even number. If it is an odd number, output: "You entered an odd number!". If it is an even number, output: "You entered an even number!". If the user quits by entering 999, output: "Thanks - Game Over!". Test your code for all three conditions. Remember 999 is an odd number so make sure it doesn't print - "You entered an odd number!"

The response should include a reference list. Double-space, using Times New Roman 12 pnt font, one-inch margins, and APA style of writing and citations.

Solution Preview :

Prepared by a verified Expert
Python Programming: Write a python script that accepts input
Reference No:- TGS02958055

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)