Commit 5d478b41 by BellCodeEditor

save project

parent 8fedfd97
Showing with 7 additions and 8 deletions
class hero:
def _hero_(self):
def _hero_(self,name,hp,attack):
self.levl=1
self.hp=300
self.attack=20
yase=hero()
yase.levl()
yase.hp()
yase.attack()
\ No newline at end of file
self.name=name
self.hp=hp
self.attack=attack
yase=hero("埡瑟",300,20)
print("yase的血量为:",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