Commit 41b7fef0 by BellCodeEditor

save project

parent ee633710
Showing with 7 additions and 4 deletions
class Hero:
def __init__(self):
self.hp=100
def __init__(self,name,attack,hp):
self.hp=hp
self.lever=1
self.attack=20
self.attack=attack
self.name=name
ysae=Hero()
ysae=Hero('亚瑟',20,300)
print(ysae.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