Commit 195d54e7 by BellCodeEditor

save project

parent 24be74d4
Showing with 8 additions and 6 deletions
class hero: class Hero:
def _init_(self): def __init__(self,name,hp,attack):
self.level=14
self.hp=200 self.name=name
self.attack=10 self.hp=hp
yase=Hero() self.attack=attack
yase=Hero("亚瑟",200,10)
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