@@ -17,3 +17,5 @@ class Square(Shape):
r = int(input("请输入圆的半径: "))
side = int(input("请输入正方形的边长: "))
shapes = [Circle(r), Square(side)]
for i in shapes:
print(i.__class__.__name__ + "的面积为: " + str(i.area()))
The note is not visible to the blocked user.