Commit a1c91ee0 by BellCodeEditor

save project

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