Commit 0efc374e by BellCodeEditor

save project

parent d6c81a0f
Showing with 27 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack,hs):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
self.hs=hs
steve=Hero('steve',300,20,1)
# alex=Hero('alex',250,23)
# woc=Hero('woc',99999999,999)
# print(steve.attack)
# print(alex.attack)
# print(woc.attack)
def upgrade():
steve.level+=2
steve.hp+=100
steve.attack+=999
steve.hs+=100000000
while steve.level<1001:
upgrade()
print(steve.attack)
print(steve.hs)
print(steve.hp)
print(steve.level)
\ 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