Computer Science, asked by najiyanasrin141, 10 months ago

Write a python program that accepts radius of a circle and print its area.

Answers

Answered by piyushkumar19
2

Explanation:

Write a Python program which accepts the radius of a circle from the user and compute the area.

Python: Area of a Circle

In geometry, the area enclosed by a circle of radius r is πr2. Here the Greek letter π represents a constant, approximately equal to 3.14159, which is equal to the ratio of the circumference of any circle to its diameter.

Answered by AskewTronics
0

Below are the output and the python program for the above question:

Output :

If the user input as 7, then the output is "154.0".

If the user input as 8, then the output is "201.14285714285714".

Explanation:

radius=float(input("Enter the radius of a circle to prints the area: "))#Take the input from the user.

print("The area of a circle is",(22/7)*radius*radius)#print the area of a circle.

Code Explanation :

  • The above code is in python, in which the first line is used to take the input from the user after instructing the user for the input and store it on the radius variable after converting it into float type value.
  • Then the area is printed with the help of a print statement after calculating the area of the circle with the help of the formula of a circle.

Learn More :

  • Python : https://brainly.in/question/14689905
Similar questions