Commit 466492f1 by BellCodeEditor

save project

parent 5a5deabb
Showing with 25 additions and 3 deletions
......@@ -5,5 +5,27 @@ class Hero:
self.attack=attack
self.name=name
kunkun=Hero('坤坤'300,80)
kunba=Hero('坤八'250,99)
def upgrate()
\ No newline at end of file
kunba=Hero('坤八'250,90)
def upgrate():
kunkun.level+=1
kunkun.hp+50
kunkun.attack+=10
upgrate()
upgrate()
print(kunkun.level)
print(kunkun.hp)
print(kunkun.attack)
def upgrate():
kunba.level+=1
kunba.hp+50
kunba.attack+=10
upgrate()
upgrate()
print(kunba.level)
print(kunba.hp)
print(kunba.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