Find area of circle by python program by R4R Team

We know that,
Area of circle is 3.14*r*r

Program -

r=input("Enter radius of circlen")
r=int(r)
area=3.14*r*r
print("Area of circle is "+str(area))


output-

Enter radius of circle
3
Area of circle is 28.259999999999998


In this progra, firstly we take radius as a input from the user, in python input things are always a string so firstly we convert it into the integer to use the radius so we do type casting by the use of int. then we calculate the area and store in vaiable 'area' then we print area.

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!