Commit 0c81b05e by BellCodeEditor

auto save

parent 91b78459
Showing with 5 additions and 14 deletions
...@@ -4,16 +4,8 @@ class Hero: ...@@ -4,16 +4,8 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero('yase',300,20) def dengji():
hy=Hero('hy',250,23) yase.level=yase.level+1
k=Hero('K',400,20) yase.hp=yase.hp+1
yase.attack=yase.attack+1
nuozhua=Hero('nuozhua',910,25) dengji()
obi=Hero('obi',200,60)
weitianzhu=Hero('weitianzhu',1000,90)
print(yase.attack)
print(hy.attack)
print(k.attack)
print(nuozhua.attack)
print(obi.attack)
print(weitianzhu.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