Python Programming Assignment 02
Python Programming Assignment 02
1. Accepts a string, an integer, a float, and a boolean from the user.
2. Initializes variables for each type, and prints them out.
3. Convert the string to uppercase and print it.
4. Check if the integer is even or odd and print the result.
5. Multiply the float by 2 and print the result.
Example Input:
Example Output:
Question 2: Operators
Example Input:
Example Output:
Addition: 13
Subtraction: 7
Multiplication: 30
Division: 3.3333333333333335
Modulus: 1
Flow Division: 3
First number is greater than second: True
First number is equal to second: False
Both conditions are true: True
Question 3: Loops
Example Input:
5
10
Skipping 12
15
Breaking at 20
Loop ended naturally
Testing & Input Handling 5 The program handles user inputs correctly
and includes basic validation for edge
cases.