You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amy Lin edited this page Jun 14, 2017
·
1 revision
Python Programming for Data Scientists & Engineers Lab #01
Lab #01-a Odd or Even Number
Program will prompt user for another attempt if the input is not an integer. (Assume not to take decimal numbers into consideration).
Then it will identify whether the number is an odd or even number.
Lab #01-b Rectangle Perimeter
Program will prompt user for another attempt if the input is not an integer. (Assume not to take decimal numbers into consideration). Will check for both of user's input of width and length.
Calculate the perimeter of the rectangle based on user's width and length.
Lab #01-c Number Guess Game
Player will have 5 chances to guess a number randomly picked by the program. It will be between 0 and 9.
Invalid input such as a string will be detected and the player will be asked to do another prompt.
The game will continue either until the player guess the right number or when the 5 guesses run out.