Commit 739a5d01 by BellCodeEditor

save project

parent ac5f1e40
Showing with 8 additions and 3 deletions
......@@ -5,6 +5,10 @@ class Hero:
self.hp=hp
self.attack=attack
yase=Hero('yase',300,20)
houyi=Hero('houyi',300,3000)
print("yaseyxxlw",yase.hp)
print("houyiyxxlw",houyi.attack)
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+5
upgrade()
upgrade()
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