python 1
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!"
8 years ago
8
Purchase the answer to view it

- pythonassignment1g.docx
- pythonassignment1.docx
Purchase the answer to view it

- evenodd.py
- Real Estate Analysis
- Is it a possibility that I can have this done by today
- Help in Supply (excel)
- Which of the following bases for segmentation is employed when consumers are grouped according to their use of a product or service (heavy versus light)?
- Counseling Theories
- Journal 4
- calculation of a mini case
- Section I Company Selection
- can you help me with this?
- How would I do this module report?