Commit 3040b594 by BellCodeEditor

auto save

parent cf4db5f2
Showing with 8 additions and 4 deletions
...@@ -4,7 +4,11 @@ class hero: ...@@ -4,7 +4,11 @@ class hero:
self.Hp = Hp self.Hp = Hp
self.attack = attack self.attack = attack
self.level = 1 self.level = 1
shi=hero("shi",300,100) shi=hero("史灯蜓",300,100)
pi=hero("pi",100,300) pi=hero("pi",100,300)
print(shi.name) def ti_sheng():
print(pi.name) shi.level=shi.level+1
\ No newline at end of file shi.Hp=shi.Hp+50
shi.attack=shi.attack+50
ti_sheng()
print(shi.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