Commit f12232a4 by BellCodeEditor

auto save

parent 77d22e68
Showing with 12 additions and 13 deletions
with open(r'c:\Users\PC\Desktop\sales_list.txt','r',encoding='utf-8') as file: import turtle as t
a = file.readlines() t.penup()
fanal_sum = [] t.goto(10,10)
for i in a: t.forward(100)
b = i.split() t.left(60)
c = 0 t.forward(100)
for sales in b[1:]: t.right(60)
c = c+int(sales) t.backward(100)
d = b[0]+str(c)+'\n' t.reset()
fanal_sum.append(d) t.down()
with open(r'c:\Users\PC\Desktop\new_sales_list.txt','a',encoding='utf-8') as file: print(/n)
file.writelines(fanal_sum) \ No newline at end of file
\ 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