Commit 829a15b3 by BellCodeEditor

save project

parent 43ef990c
Showing with 9 additions and 5 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=10 self.level=1
self.hp=999 self.name=name
self.attack=999 self.hp=hp
yase=Hero() self.attack=attack
yase=Hero("亚瑟",1999,999)
hp=Hero("后翼",1888,1000)
print(yase.hp)
print(yase.hp) print(yase.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