Commit 32f352ee by BellCodeEditor

save project

parent cc557ac4
Showing with 5 additions and 2 deletions
...@@ -4,12 +4,12 @@ class hero: ...@@ -4,12 +4,12 @@ class hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
lixin=hero(15,1200,85) lixin=hero(1,300,30)
def d(): def d():
lixin.level=lixin.level+1 lixin.level=lixin.level+1
lixin.hp=lixin.hp+50 lixin.hp=lixin.hp+50
lixin.attack=lixin.attack+5 lixin.attack=lixin.attack+3
d() d()
d() d()
d() d()
...@@ -24,4 +24,6 @@ d() ...@@ -24,4 +24,6 @@ d()
d() d()
d() d()
d() d()
print(lixin.level)
print(lixin.hp) print(lixin.hp)
print(lixin.attack)
\ 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