CYB 130 Week 2 Loops and Conditional Statements | eBooks | Education

CYB 130 Week 2 Loops and Conditional Statements

CYB 130 Week 2 Loops and Conditional Statements PLDZ-9967
In Stock
$ 7.00 USD
Buy and Download   > Description

 

 

 

***************************************************************

Click Here To Download Your Files :  >>{    Download Link   }<<

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can buy more tutorials at a more favorable price from the below link.

Click Here To Buy

***************************************************************

 

  ---------------------------------------------------------------------------------------------------------------------

 

CYB 130 Week 2 Loops and Conditional Statements

 

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!”

Submit the code copied and pasted into a document and include a screen shot of it working on your own computer system.

Submit your assignment using the Assignment Files tab.

*************************************************************** Click Here To Download Your Files : { Download Link } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can buy more tutorials at a more favorable price from the below link.
Recent Reviews Write a Review
0 0 0 0 reviews