Commit a82b9773 by BellCodeEditor

save project

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