Commit 7cf400c5 by BellCodeEditor

save project

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