Commit a21dbada by BellCodeEditor

save project

parent cb53eb03
Showing with 8 additions and 22 deletions
......@@ -4,28 +4,15 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def upurade(self):
self.level=xyi.level+1
self.hp=xyi.hp+40
self.attack=xyi.attack+10
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
xyi=Hero('xyi',150,25)
def upurade():
xyi.level=xyi.level+1
xyi.hp=xyi.hp+40
xyi.attack=xyi.attack+10
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
upurade()
xyi=Hero('xyi',350,25)
hy.upurade()
xyi.upurade()
print(xyi.level)
print(xyi.hp)
print(xyi.attack)
\ No newline at end of file
print(xyi.attack)
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