📜  Python程序用于查找圆的面积

📅  最后修改于: 2022-05-13 01:56:56.513000             🧑  作者: Mango

Python程序用于查找圆的面积

可以使用以下公式简单地评估圆的面积。

Area = pi * r2
where r is radius of circle 
Python3
# Python program to find Area of a circle
  
def findArea(r):
    PI = 3.142
    return PI * (r*r);
  
# Driver method
print("Area is %.6f" % findArea(5));
  
  
  
# This code is contributed by Chinmoy Lenka


Python3
# Python program to find Area of a circle using inbuild library
  
import math
def area(r):
 area = math.pi* pow(r,2)
 return print('Area of circle is:' ,area)
area(4)
  
  
# This code is contributed by Sejal Pol


Python3

# Python program to find Area of a circle using inbuild library
  
import math
def area(r):
 area = math.pi* pow(r,2)
 return print('Area of circle is:' ,area)
area(4)
  
  
# This code is contributed by Sejal Pol

更多详细信息请参考程序查找圆面积的完整文章!