Professional Documents
Culture Documents
Expt4 Harsh - 043900
Expt4 Harsh - 043900
2
AIM: EDIT/COMPILE/RUN A PROGRAM TO READ THE RADIUS OF
CIRCLE AND PRINT THE AREA OF CIRCLE.
PROGRAM A:
INPUT:
import math as a
radius = float(input("Please enter the radius of the given
circle:"))
area_of_the_circle=a.pi*radius*radius
print("The area of the given circle is :",area_of_the_circle)
OUTPUT:
PROGRAM B:
INPUT:
pi=3.14
radius=float(input("please enter the radius of the given
circle:"))
area_of_the_circle=pi*radius*radius
print("the area of given circle is :",area_of_the_circle)
OUTPUT:
PROGRAM C:
INPUT:
import math
def areaofcircle(Radius):
area =Radius**2*math.pi
return area
Radius = float(input("Please enter the radius of the given
circle:"))
print("The area of the given circle is:",areaofcircle(Radius))
OUTPUT:
CONCLUSION:
I HAVE COMPLETED THIS EXPERIMENT SUCESSFULLY AND I HAVE CAME TO
KNOW HOW TO WRITE AND EXECUTE A PROGRAM TO READ THE RADIUS OF
CIRCLE AND PRINT THE AREA OF CIRCLE.