From aaec7bb5db4e06932d391f69c3be08fdc92990cc Mon Sep 17 00:00:00 2001 From: silksnow Date: Tue, 6 Oct 2026 23:51:04 +0800 Subject: [PATCH] hard q30: define 3 classes --- q30/shapes.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 q30/shapes.py diff --git a/q30/shapes.py b/q30/shapes.py new file mode 100644 index 0000000..8afa14f --- /dev/null +++ b/q30/shapes.py @@ -0,0 +1,14 @@ +class Shape: + def area(self): + return 0 + +class Circle(Shape): + def area(self): + return 3.14 * r * r + +class Square(Shape): + def area(self): + return side * side + +if __name__ == '__main__': + \ No newline at end of file