Commit 7cf400c5 by BellCodeEditor

save project

parent ec577514
Showing with 8 additions and 5 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,levell,hp,attack):
self.levell=1 self.levell=levell
self.hp=300 self.hp=hp
self.attack=20 self.attack=attack
yase=Hero() yase=Hero("亚瑟",3,300,4)
lan=Hero("澜",3,200,8)
print(yase.hp) print(yase.hp)
print(lan.attack)
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