Commit a82b9773 by BellCodeEditor

save project

parent b2d811c4
Showing with 9 additions and 5 deletions
class Hero() class Hero()
def_into_(self): def_into_(self,name,HP,attack):
self.level = 1 self.level = 1
self.HP=300 seif.name=name
self.attack = 25 self.HP=HP
yase=Hero self.attack = attack
print(yase.HP) yase=Hero('yase',300,24)
houyi=Hero('houyi',350,29)
print('yase的血量',yase,HP)
print('houyi的血量',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