Commit 9bf3a913 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class Hero:
def __init__(salt,HP,MP,speed):
salt.HP = HP
salt.MP = MP
salt.speed = speed
yase = Hero(300,200,120)
houyi = Hero(250,300,200)
def upgrade():
yase.HP = yase.HP+10
yase.MP = yase.MP+20
yase.speed = yase.speed+50
upgrade()
print(yase.speed)
\ 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