From 4fcd7e12274026e2e519cf955dbf87ff399156d6 Mon Sep 17 00:00:00 2001 From: SKYFIR35 Date: Wed, 7 Oct 2026 22:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E7=B1=BBsquare?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 陈张本-26020007010-912523257.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/陈张本-26020007010-912523257.py b/陈张本-26020007010-912523257.py index 4d137a2..938abc6 100644 --- a/陈张本-26020007010-912523257.py +++ b/陈张本-26020007010-912523257.py @@ -6,4 +6,10 @@ class Circle(Shape): self.radius = radius def area(self): - return math.pi * self.radius * self.radius \ No newline at end of file + return math.pi * self.radius * self.radius +class Square(Shape): + def __init__(self, side): + self.side = side + + def area(self): + return self.side * self.side \ No newline at end of file