Commit 15b9272d by BellCodeEditor

save project

parent 14aa37d3
Showing with 3 additions and 5 deletions
...@@ -3,14 +3,12 @@ class hero: ...@@ -3,14 +3,12 @@ class hero:
self.hp=hp self.hp=hp
self.level=level self.level=level
self.attack=attack self.attack=attack
tian=hero("tian",1,500,50) tian=hero("tian",1,500,50)
def aaa(): def aaa():
tian.hp=tian.hp+50
tian.level=tian.level+1 tian.level=tian.level+1
tian.hp=tian.hp+50
tian.attack=tian.attack+5 tian.attack=tian.attack+5
aaa() aaa()
print(tian.hp)
print(tian.level) \ No newline at end of file
\ 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