Commit a7d08b09 by BellCodeEditor

save project

parent 024862b7
Showing with 10 additions and 9 deletions
class Hero: class Hero:
def __init__(self,hp,nema,attack): def __init__(self,hp,nema,attack):
self.level=1 self.level=1
self.nema=nema self.nema=nema
self.hp=10 self.hp=hp
self.attack=attack self.attack=attack
def ugrde(): def ugrde():
yase.level=yase.level+1 yase.level=yase.level+1
yase.hp=yase.hp+20 yase.hp=yase.hp+20
yase.attack=yase.attack+10 yase.attack=yase.attack+10
yase=Hero(10000,“亚瑟”,60000000 yase=Hero(10000,'亚瑟',60000000)
yase.ugrde() yase.ugrde()
print(yase.hp) print(yase.hp)
print(hoyi.hp) print(hoyi.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