Commit 52b21b5e by BellCodeEditor

auto save

parent 9b0a66d6
Showing with 37 additions and 0 deletions
class Animal():
def __init__(self):
self.weight='10kg'
self.foot=4
self.color='black'
class bird(Animal):
def __init__(self):
self.weight='1kg'
self.foot=2
dog=bird()
print(dog.weight)
print(dog.foot)
class Cat():
def __init__(self):
self.eye=2
self.foot=4
self.color='black'
def kk(self,af):
print(self,'今天吃了',int(af)*9999999999999999999999999,'吨')
aa=Cat()
aa.kk(345)
\ No newline at end of file
class person():
def __init__(self):
self.foot=2
class teacher(person):
def __init__(self,name,age,subject):
self.name=name
self.age=age
self.subject = subject
def aa(self,subject):
print(self.subject)
dog=teacher('ff',0.111,'PE')
dog.aa('Maths')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment