Commit 0541030b by BellCodeEditor

save project

parent ceb4f846
Showing with 11 additions and 5 deletions
......@@ -5,7 +5,13 @@ class Hero:
self.hp = hp
self.attack = attack
yase = Hero('亚瑟',200,20)
print(yase.attack)
print(yase.name)
print(yase.hp)
print(yase.level)
\ No newline at end of file
def upgrade():
yase.level +=100
yase.hp +=100
yase.attack +=100
upgrade()
upgrade()
print("attack",yase.attack)
print("name",yase.name)
print("hp",yase.hp)
print("level",yase.level)
\ 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