Commit 47c1198e by BellCodeEditor

save project

parent 4cd30e22
Showing with 8 additions and 12 deletions
A = [] class Hero:
with open(r'C:\Users\Administrator\Desktop\sales_list.txt','r',encoding='GBK') as file1: def __init__(self):
A = file1.readline() self.level = 1
print(A) self.hp = 300
sum = 0 self.attack = 50
final_sum=[] yase = Hero()
for i in A[1:]: print(yase.hp)
print(i) \ No newline at end of file
sum = sum+int(i)
final_sum.append(i)
print(final_sum)+'/n'
\ 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