Commit 7a2cae4b by BellCodeEditor

save project

parent d6c81a0f
Showing with 14 additions and 0 deletions
class Hero:
def __init__(self,level,hp,name,sttack):
self.level=level
self.hp=hp
self.name=name
self.sttack=sttack
yase=Hero(1,12000,'亚瑟',4000)
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+1000
yase.sttack=yase.sttack+700
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