Commit 3c598cdf by BellCodeEditor

save project

parent a26808fe
Showing with 6 additions and 0 deletions
...@@ -5,5 +5,11 @@ class Hero: ...@@ -5,5 +5,11 @@ class Hero:
self.hp=hp self.hp=hp
self.gongji=gongji self.gongji=gongji
yase=Hero('yase',1,300,20) yase=Hero('yase',1,300,20)
def up():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.gongji=yase.gongji+10
up()
print(yase.hp) print(yase.hp)
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