Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
20 views

Python Codes

The document outlines 9 programming assignments for a Python lab, where students are asked to write programs that print text, perform basic math operations, check variable types, demonstrate data types and operators, calculate square roots and areas of shapes based on user input.

Uploaded by

Amisha Upadhyay
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Python Codes

The document outlines 9 programming assignments for a Python lab, where students are asked to write programs that print text, perform basic math operations, check variable types, demonstrate data types and operators, calculate square roots and areas of shapes based on user input.

Uploaded by

Amisha Upadhyay
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

LAB ASSIGNMENT 1

1. Write a program in Python to print “Hello World”.

Output:

2. Write a program in Python to multiply two variables.

Output:

3. Write a program in Python to check the type of variables used in Q2.

Output:
4. Write a program in Python to demonstrate all data types.
Output:
5. Write a program in Python to demonstrate all operators.
Output:
6. Write a program to input two integers, divide them and print the quotient and the remainder.
Output:

7. Write a program in Python to calculate the square root of the user entered number.

Output:

8. Write a program in Python to print the area of a circle for radius given by the user.

Output:
9. Write a program in Python to calculate area and perimeter of a rectangle, whose length and breadth are
entered by the user at the run time.

Output:

You might also like