Commit 8baa7e1f by BellCodeEditor

save project

parent 626ca329
Showing with 16 additions and 5 deletions
......@@ -4,10 +4,20 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
tzb=Hero('hy',250,23)
k=Hero('K',5600,199)
sj=Hero('sj',8000,100)
qs=Hero('qs',2,1000)
print(sj.attack)
print(qs.attack)
bnt=Hero('sj',8000,100)
DF_14=Hero('qs',2,1000)
print(bnt.attack)
print(DF_14.attack)
def upsj(name):
name.level=name.level+1
name.hp=name.hp+20
name.attack=name.attack+2
upsj(bnt)
\ 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