Commit 400513b7 by BellCodeEditor

save project

parent c9ba24f0
Showing with 9 additions and 9 deletions
......@@ -5,13 +5,12 @@ class Hero:
self.hp = hp
self.attack=attack
yase = Hero("yase"300,20)
houyi = Hero("houyi"240,23)
def upgrade():
yase.level=level
yase.hp = yase.hp+50
yase.attack=yase.attack+4
yase = Hero("yase",300,20)
print("yase hp",yase.hp)
print("houyi hp"houyi.hp)
upgrade()
upgrade()
print("after+2,yase hp:"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