Commit c0e64028 by BellCodeEditor

save project

parent ba8b1f38
Showing with 9 additions and 12 deletions
with open (r'C:\Users\CM\Documents\lesson13-1\sales_list.tet','r',encoding='uft-8') as file: class Hero:
a=file.readlines() def_init_(self)
final_sum=[] self.level = 1
for i in a: self.hp= 300
data=l.split()
sum=0 yase = Hero()
for sales in data[1:]: print("yase的血量值"yase.hp)
sum=sum+int(sales) print("yase的攻击力为"yase.attack)
result=data[0]+str(sum)+'\n' \ No newline at end of file
final_sum.append(resule)
\ 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