Commit 15353410 by BellCodeEditor

save project

parent babb9cf8
Showing with 7 additions and 7 deletions
class hero():
def __init__(self):
self.leave=1
self.hp=450
self.attack=10
yase=hero()
print(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('亚瑟',450,10)
print(yase.name)
\ 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