- #求球体数据
import math
r = float(input(“请输入球的半径:”))
area = 4 * math.pi * math.pow(r, 2)
volume = (4 / 3) * math.pi * math.pow(r, 3)
print(str.format(“球的表面积为:{0:2.2f},体积为:{1:2.2f}”, area ,volume))
python_求球体数据
猜你喜欢
转载自blog.csdn.net/weixin_43469680/article/details/88593559
今日推荐
周排行