Commit 3e505f73 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class Hero:
def __init__(ziji,name,hp,attack):
ziji.level=1
ziji.name=name
ziji.hp=hp
ziji.attack=attack
ys=Hero('ys',300,20)
hy=Hero('hy',250,23)
sq=Hero('sq',1000000000,23000000000)
print(sq.hp)
def upys():
ys.level+=1
ys.hp+=50
ys.attack+=4
upys()
print(ys.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