Python program to calculate the area of the cylinder.

In this python basic program, we will calculate the area of the cylinder using the formula 2*PI*r*h + 2*PI*r*r.

Steps to solve the program
  1. Take the radius and height of the cylinder as input through the user.
  2. Calculate the area of the cylinder using the formula: 2*PI*r*h + 2*PI*r*r, where h is the height and r is the radius of the cylinder.
  3. Print the output.
				
					r = int(input("Enter radius of cylinder: "))
h = int(input("Enter height of cylinder: "))
area = 2*3.14*r*h+2*3.14*r*r

print("Area of cylinder: ",area)
				
			

Output :

				
					Enter radius of cylinder: 4
Enter height of cylinder: 5
Area of cylinder:  226.08
				
			

calculate the area of a cube.

check whether the given number is an Armstrong number or not.

Leave a Comment