Commit 218244e0 by BellCodeEditor

save project

parent 2b43a7ec
Showing with 8 additions and 3 deletions
...@@ -6,8 +6,13 @@ class Hero(): ...@@ -6,8 +6,13 @@ class Hero():
self.name=name self.name=name
yasi=Hero("yasi",3000,389) yasi=Hero("yasi",3000,389)
houyi=Hero("houyi",2500,585)
print(yasi.hp) print(yasi.hp)
print(houyi.hp)
def upgrade():
yasi.level+=1
yasi.hp+=300
yasi.attack+=79
upgrade()
upgrade()
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