Commit 1de0c3ef by BellCodeEditor

save project

parent e619f740
Showing with 23 additions and 13 deletions
class Hero:
def __init__(self,name,hp,attack,level):
self.level=level
self.hp=hp
self.attack=attack
self.name=name
yase=Hero("yase",9999999,999,1)
houyi=Hero("houyi",4321243,1,53253314)
print("")
print("")
\ No newline at end of file
class Hero:
def __init__ (self,name,hp,attack,level):
self.attack=attack
self.hp=hp
self.level=level
self.name=name
yase=Hero("yess",8000,150,15)
houyi=Hero("houyi",4000,1000,15)
def uplevel():
yase.level=yase.level+1
yase.hp=yase.hp+2000
yase.attack=yase.attack+50
uplevel()
uplevel()
uplevel()
print("yasedj:",yase.level)
print("hoyy:",houyi.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