Commit f18f08ba by BellCodeEditor

save project

parent 9a8b80b4
Showing with 9 additions and 2 deletions
......@@ -5,5 +5,12 @@ class Hero:
self.attack=attack
yase=Hero(200,30)
houyi=Hero(180,33)
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+5
upgrade()
upgrade()
print(yase.level)
print(yase.hp)
print(houyi.attack)
\ No newline at end of file
print(yase.attack)
\ 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