Commit 4bc477a5 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.name = "余政杰"
self.level = 999
self.hp = 999
self.attack = 999
def upgrade():
yase.level=yase.level+999
yase.hp=yase.hp+999
yase.attack=yase.attack+999
yase = Hero("余政杰",300,20)
print("余政杰的初始血量值为",yase.hp)
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