In this program, with the help of python, we are calculating the area of the circle.

Area of the circle is equal to the 3.14 * r * r, where r is the radius of the circle.

Area of the circle is the number of square units inside the circle.

For example:

Input: r = 5

Output: 3.14 * 5 * 5 = 78.5

    Algorithm:

  1. Input the radius from the user.
  2. Calculate the area of the circle using 3.14 * r * r.
  3. Print the area.
  4. Exit 

Code:

r = int(input("Enter the radius:"))

area = 3.14*r*r

print("The area is:", area)

 

Output: 

Enter the radius : 2

The area is : 12.56

Report Error/ Suggestion

Related Posts:

[yuzo_views]











CopyRight © 2019

CopyRight © 2019