From 91420025c082ee3fa945ab67938499f78750bc95 Mon Sep 17 00:00:00 2001 From: MX <3037347690@qq.com> Date: Sun, 4 Oct 2026 14:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=85=A5r=E5=92=8Cside=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E4=B8=94=E5=B0=86=E4=B8=A4=E4=B8=AA=E5=AD=97=E7=B1=BB?= =?UTF-8?q?=E6=94=BE=E5=85=A5=E5=88=97=E8=A1=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 国庆考核.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/国庆考核.py b/国庆考核.py index 47b4e17..328be32 100644 --- a/国庆考核.py +++ b/国庆考核.py @@ -12,4 +12,8 @@ class Square(Shape): def __init__(self, side): self.side = side def area(self): - return self.side * self.side \ No newline at end of file + return self.side * self.side + +r = int(input("请输入圆的半径: ")) +side = int(input("请输入正方形的边长: ")) +shapes = [Circle(r), Square(side)]