init
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class Human:
|
||||
def __init__(self):
|
||||
self.health = 100
|
||||
self.money = 100
|
||||
|
||||
class Student(Human):
|
||||
def __init__(self, name, age):
|
||||
super().__init__()
|
||||
self.name = name
|
||||
self.age = age
|
||||
|
||||
student1 = Student("kir", 20)
|
||||
print(student1.money)
|
||||
Reference in New Issue
Block a user