Commit 3fd2aef5 by BellCodeEditor

save project

parent a8a660aa
Showing with 9 additions and 6 deletions
class H(): class H():
def __init__(self): def __init__(self,name,hp,attack):
self.name=name
self.level=1 self.level=1
self.hp=300 self.hp=hp
self.attack=1 self.attack=attack
yase=H() yase=H("亚瑟",300,40)
print(yase.hp) houyi=H("后羿",240,45)
\ No newline at end of file print(yase.hp)
print(houyi.hp)
\ 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