Commit 32d5dd45 by BellCodeEditor

save project

parent 8fa28efd
Showing with 5 additions and 2 deletions
...@@ -5,9 +5,11 @@ class Hero: ...@@ -5,9 +5,11 @@ class Hero:
self.hp=10 self.hp=10
self.attack=attack self.attack=attack
yase=Hero() yase=Hero()
print(yase.hp)
print(hoyi.hp)
def ugrde(): def ugrde():
yase.level=yase.level+1 yase.level=yase.level+1
yase.hp=yase.hp+20 yase.hp=yase.hp+20
yase.attack=yase.attack+10 yase.attack=yase.attack+10
ugrde()
print(yase.hp)
print(hoyi.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