Some Basic Python Programs
Some Basic Python Programs
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: