Commit 07fc7ca2 by BellCodeEditor

save project

parent 34a452b7
Showing with 15 additions and 10 deletions
class hero:
def __init__(self,name,hp,attack):
self.level = 1
self.name = name
self.hp = hp
self.attack = attack
def upgrade():
ys.level=ys.level+1
ys.hp=ys.hp+50
ys.attack=ys+10
file_sum
fot i in a
data=i.split
str=0
for sales in data[1:]
sum=sum+int(sales)
reilt=data[0:]+str(sun)+file_sum
print(reilt)
file writelens(file_sum)
\ No newline at end of file
ys = hero("ys",300,20)
print("ys的初始血量为:"ys.hp)
upgarde()
upgarde()
print("ys升级二次后血量为:"ys.hp)
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