Commit 3fe6677e by BellCodeEditor

save project

parent 45f66d55
Showing with 2 additions and 1 deletions
with open(r"c:\Users\Lenovo\Documents\lesson13-3\sales_list.txt","r",encoding="utf-8")as file: with open(r"c:\Users\Lenovo\Documents\lesson13-3\sales_list.txt","r",encoding="utf-8")as file:
a=file.readlines() a=file.readlines()
#print(a) #print(a)
final_sum=[]
for i in a: for i in a:
data=i.split() data=i.split()
sum=0 sum=0
for b in data[1:]: for b in data[1:]:
sum=sum+int(b) sum=sum+int(b)
g=data[0]+str(sum) g=data[0]+str(sum)/n
print(g) print(g)
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