该题目是第一章第一题,给定球体的半径计算其直径、圆周长、表面积和体积
#计算球体的直径、圆周长、表面积和体积
import math
r = float(input("Enter the sphere's radius:"))
d = 2 * r
l = 2 * math.pi * r
s = 4 * math.pi * r * r
v = 4/3.0 * math.pi * r * r * r
print("Diameter :", d)
print("Circumference:", l)
print("Surface area :", s)
print("Volume :", v)