Commit 66293567 by BellCodeEditor

save project

parent 709338f7
Showing with 8 additions and 9 deletions
class Dog():
def __init__(self,co,ty,pr):
self.t=4
self.ty=ty
self.co=co
self.pr=pr
class Hero():
def __init__(self):
self.lv=1
self.hp=300
self.at=20
dog1=Dog('黑色','不知道','还是不知道')
print(dog1.t,dog1.ty,dog1.co,dog1.pr)
\ No newline at end of file
hero1=Hero()
print(hero1.lv,hero1.hp,hero1.at)
\ No newline at end of file
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