Commit 15b9272d by BellCodeEditor

save project

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