Commit 63a8a9dd by BellCodeEditor

save project

parent 6e5279d9
Showing with 8 additions and 4 deletions
......@@ -6,9 +6,13 @@ class Hero:
self.attack=attack
yase=Hero("亚瑟",300,20)
houyi=Hero("后羿",250,23)
def upgrade():
yase.attack+=4
yase.hp+=50
yase.level+=1
upgrade()
upgrade()
print(yase.name)
print(yase.attack)
print(yase.hp)
print(houyi.name)
print(houyi.attack)
print(houyi.hp)
\ No newline at end of file
print(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