Commit 4d46d4b5 by BellCodeEditor

save project

parent d6c81a0f
Showing with 20 additions and 0 deletions
class hero:
def __init__(delf,name,hp,attack):
delf.name=name
delf.level=1
delf.hp=hp
delf.attack=attack
zhaoyun=hero("赵云",100000000000000000000000000000000000000000000000000000,100000000000000000000000000000000000000)
def upgrand():
zhaoyun.level=zhaoyun.level+1
zhaoyun.hp=zhaoyun.hp*10
zhaoyun.attack=zhaoyun.attack*100
upgrand()
upgrand()
upgrand()
upgrand()
upgrand()
print(zhaoyun.level)
print(zhaoyun.hp)
print(zhaoyun.attack)
\ 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