0% found this document useful (0 votes)
3 views1 page

Python Basics: Variables & Operators Lab

The document outlines a Python lab assignment consisting of 11 tasks focused on variables, data types, and operators. Tasks include printing greetings, performing arithmetic operations, checking variable types, and calculating geometric properties. The assignment aims to enhance programming skills through practical exercises.

Uploaded by

rishabh.negi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Basics: Variables & Operators Lab

The document outlines a Python lab assignment consisting of 11 tasks focused on variables, data types, and operators. Tasks include printing greetings, performing arithmetic operations, checking variable types, and calculating geometric properties. The assignment aims to enhance programming skills through practical exercises.

Uploaded by

rishabh.negi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like