PYTHON LAB-1 (23B65CA126)
ASSIGNMENT 1 (Variables, Data Types & Operators)
1. Write a program in Python to print "Greetings, Universe".
2. Write a program in Python to add two variables.
3. Write a program in Python to check the type of variables used in Q2.
4. Write a program in Python to demonstrate all data types.
5. Write a program in Python to demonstrate arithmetic, relational, and logical operators.
6. Write a program to input two integers, subtract them, and print the difference and the
absolute value of the difference.
7. Write a program in Python to calculate the cube root of a user-entered number.
8. Write a program in Python to calculate the area of a triangle, where the user inputs the
base and height.
9. Write a program in Python to calculate the volume and surface area of a cylinder, given
the radius and height by the user.
10. Write a program in Python to calculate the simple interest, given the principal, rate of
interest, and time from the user.
11. Write a program to input two numbers, find the sum of their squares, and print the result.