Commit 27d691dd by BellCodeEditor

save project

parent 44b2ef21
Showing with 12 additions and 6 deletions
class Hero: class Hero:
def__int__(self) def__int__(self,name,hp,attack)
self.level=1 self.level
self.name self.name
self.hp=300 self.hp
self.attack=20 self.attack
yase=Hero() yase=Hero()
print(yase,300,20) print(yase,300,20)
print(houyi,250,23) print(houyi,250,23)
\ No newline at end of file def wu()
yase.level=levels+1
yase.hp=hp+50
self.attack=attack+4
wu()
wu()
\ 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