docs: update project and q30 READMEs

This commit is contained in:
2026-10-07 00:17:30 +08:00
parent 266d23e620
commit a9d62a1ff5
3 changed files with 8 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
# 26国庆招新综合考核试题实践题部分
## 代码思路目录
- [q30 README](q30/README.md)
+4
View File
@@ -0,0 +1,4 @@
### 困难部分第 30 题
此题考查继承与多态,我只需要按题目去定义即可。为了方便在列表中创建实例,加了`__init__`方法。Python 定义抽象类需要来自模块 abc 的装饰器 @abstractmethod,能够让 Pylance 不发出协变不兼容警告,此处为了简便没有使用
[回到主项目 README](../README.md)
+1 -1
View File
@@ -1,6 +1,6 @@
class Shape: class Shape:
def area(self): def area(self):
return return 0
class Circle(Shape): class Circle(Shape):
def __init__(self, r): def __init__(self, r):