Commit 25ed2758 by BellCodeEditor

save project

parent 399aa014
Showing with 19 additions and 7 deletions
...@@ -7,9 +7,4 @@ for i in a: ...@@ -7,9 +7,4 @@ for i in a:
w=data[0] w=data[0]
print(q) print(q)
print(w) print(w)
sum=0 \ No newline at end of file
for e in q:
r=int(e)
sum=sum+r
print(sum)
\ No newline at end of file
with open(r'C:\Users\Administrator\Documents\lesson13-3\sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines()
#print(a)
for i in a:
data=i.split()
q=data[1:]
w=data[0]
#print(q)
#print(w)
sum=0
for e in q:
r=int(e)
sum=sum+r
r=data[0]+str(sum)
print(r)
\ 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