Commit 39baa209 by BellCodeEditor

save project

parent d6c81a0f
Showing with 15 additions and 0 deletions
class Hero:
def __init__(self,name,attack,HP):
self.Level=1
self.name=name
self.attack=attack
self.HP=HP
yase=Hero("亚瑟",20,300)
def upgrade():
yase.Level+=1
yase.attack+=4
yase.HP+=50
upgrade()
upgrade()
print(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