Lab 1 Python
Lab 1 Python
For each problem copy your code/ input and output data (your answers).
Problem 1 (Demo)
Write a script that will check if the integer number entered by user is even, odd, or zero.
Problem 2
Experiment, in the Console Window, with using the print function for real numbers. Make
a note of what happens for each. Use print to print the real number 12345.6789.
Problem 3
Write a script that will calculate value of the function z. It prompts the user for two
integers x and t, calculates z and prints it with 2 decimal places.
Problem 5
Write a script areaMenu that will print a list consisting of “cylinder”, “circle”, and
“rectangle”. It prompts the user to choose one, and then prompts the user for the
appropriate quantities (e.g., the radius of the circle) and then prints its area. If the user
enters an invalid choice, the script simply prints an error message. The script should use a
if-elif-else statement to accomplish this.
Here are two examples of running it (units are assumed to be inches).
>> areaMenu
Menu
1. Cylinder
2.Circle
3.Rectangle