Commit 5d478b41 by BellCodeEditor

save project

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