Commit 478f51ab by BellCodeEditor

save project

parent d6c81a0f
Showing with 22 additions and 0 deletions
class hero:
def __init__(pop,name,hp,att):
pop.name = name
pop.hp = hp
pop.ieve = 1
pop.att = att
def upgrade():
lijunyi.hp = lijunyi.hp-10
lijunyi.ieve = lijunyi.ieve+1
lijunyi.att = lijunyi.att+1
lijunyi=hero("李俊毅是",250,0.1)
upgrade()
upgrade()
print(lijunyi.name)
print(lijunyi.hp)
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