0% found this document useful (0 votes)
20 views

Some Basic Python Programs

Uploaded by

rihankhan844.786
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)
20 views

Some Basic Python Programs

Uploaded by

rihankhan844.786
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
You are on page 1/ 20

Some Basic Python

Programs

RECTANGLE:
Question-1
Write a python program to calculate the area of a rectangle
given its length and width.

Input:

Output:
Question-2
Write a python program to calculate the perimeter of a
rectangle given its length and width.

Input:

Output:
Circle:
Question-1
Write a python program to calculate the area of a circle
given its radius.

Input:

Ouput:
Question-2
Write a python program to calculate the perimeter of a circle
given its radius.

Input:

Output:
Triangle:
Question-1
Write a python program to calculate the area of a triangle
given its base and height.

Input:

Output:
Question-2
Write a python program to calculate the perimeter of a
triangle given its three side.

Input:

Output:
Square:
Question-1
Write a python program to calculate the area of a
square given its side.

Input:

Output:
Question-2
Write a python program to calculate the
perimeter of a square given its side.

Input:

Output:
Parallelogram:
Question-1
Write a python program to calculate the area of a
Parallelogram given its base and height.
Input:

Output:
Question-2
Write a python program to calculate the perimeter of a.
Parallelogram given its base and side length.

Input:

Output:
Trapezoid:
Question-1
Write a python program to calculate the area of a trapezoid
given its bases and height.

Input:

Output:
Question_2
Write a python program to calculate the perimeter of a.
Parallelogram given its four sides.

Input:

Output:
Sphere:
Question-1
Write a python program to calculate the volume of a sphere
given its radius.

Input:

Output:
Question-2
Write a python program to calculate the surface area of a
sphere given its radius.

Input:

Output:
Cylinder:
Question-1
Write a python program to calculate the volume of a cylinder
given its radius and height.

Input:

Output:
Question-2
Write a python program to calculate the surface area of a
cylinder given its radius and height.

Input:

Output:
Cone:
Question-1
Write a python program to calculate the volume of a cone
given its radius and height.

Input:

Output:
Question-2
Write a python program to calculate the surface area of a
cone given its radius and height.
Cuboid:
Question-1
Write a python program to calculate the volume of a cuboid
given its length,width and height.

Input:

Output:
Question-2
Write a python program to calculate the surface area of a
cuboid given its length,width and height.

Input:

Output:

You might also like