Commit 39bbcc9f by BellCodeEditor

save project

parent c7f0f1a7
Showing with 5 additions and 4 deletions
with open(r"c:\Users\Asus\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8") as fil
a = file_1.readines()
with open(r"c:\Users\Asus\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8") as file_1:
a = file_1.readlines()
for i in a:
date = i.split()
#print(date[0])
#print(date[1:])
sum1 = 0
for sales in date:
for sales in date[1:]:
sum1 = sum1 + int(sales)
resuit = date[0] + str(sum1)
result = date[0] + str(sum1)
print(result)
\ 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