题解 | #球的表面积#
球的表面积
https://www.nowcoder.com/practice/7a5e2f1ed2594e38bad804323a775c93
import math class BallArea: def __init__(self, r): self.r = r def Area(self, r): s = 4 * math.pi * pow(r, 2) return s for i in [1, 2, 4, 9, 10, 13]: b = BallArea(i) print(round(b.Area(i), 2))