使用python计算圆面积和周长的方法
圆周长计算公式:girth = 2π美国高防vpsr
圆面积计算公式:area = πr
参数:
r:表示圆的半径。
import math
radius=input(\"radius of cricle:\")
girth=2*math.pi*radius
area=math.pi*radius*radius
print ( \"circumference of circle: %.2f\" % girth)
print ( \"area of cricle: %.2f\"% area)
《使用python计算圆的面积和周长》来自互联网同行内容,若有侵权,请联系我们删除!
活动:慈云数据爆款香港服务器,CTG+CN2高速带宽、快速稳定、平均延迟10+ms 速度快,免备案,每月仅需19元!! 点击查看
还没有评论,来说两句吧...