09-15-周一_11-25-51

This commit is contained in:
2025-09-15 11:25:51 +08:00
parent 4a83558acd
commit 257e88d79f
5 changed files with 23 additions and 23 deletions

View File

@@ -311,9 +311,9 @@ class Student:
return cls.__num
Student('陈松', 18)
Student('阿松', 36)
Student('松松', 73)
Student('张三', 18)
Student('李四', 36)
Student('王五', 73)
print(Student.getNum())
```
@@ -370,7 +370,7 @@ class People:
def bmi(self):
return self.weight / (self.height**2)
p1=People('陈松',75,1.85)
p1=People('张三',75,1.85)
print(p1.bmi)
```