题解 | #球的表面积#
球的表面积
https://www.nowcoder.com/practice/7a5e2f1ed2594e38bad804323a775c93
import math
def ball_area(r):
return 4 * math.pi * r ** 2
ball_r = [1, 2, 4, 9, 10, 13]
for r in ball_r:
print("{:.2f}".format(ball_area(r)))
球的表面积
https://www.nowcoder.com/practice/7a5e2f1ed2594e38bad804323a775c93
import math
def ball_area(r):
return 4 * math.pi * r ** 2
ball_r = [1, 2, 4, 9, 10, 13]
for r in ball_r:
print("{:.2f}".format(ball_area(r)))
相关推荐