Commit a1c91ee0 by BellCodeEditor

save project

parent 01973c15
Showing with 7 additions and 7 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=100 self.name=name
self.hp=999 self.hp=hp
self.attack=1000000 self.attack=attack
yase=Hero() yase=Hero("亚瑟",120,40)
print("yase的血量是:",yase.hp) print("亚瑟的血量是:",yase.hp)
\ No newline at end of file \ 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