Commit b70c8cc1 by BellCodeEditor

save project

parent 7e8b182b
Showing with 6 additions and 42 deletions
import turtle as t
import math
t.speed(0)
t.delay(10)
t.penup()
t.goto(-150,200)
t.setheading(160)
t.begin_fill()
t.pendown()
t.circle(-30,230)
t.setheading(180)
t.circle(37,90)
t.end_fill()
t.penup()
t.goto(60,200)
t.setheading(20)
t.begin_fill()
t.pendown()
t.circle(30,230)
t.setheading(0)
t.circle(-37,90)
t.end_fill()
t.pensize(5)
t.penup()
t.goto(-113,237)
t.setheading(30)
t.pendown()
t.circle(-134,60)
t.penup()
t.goto(-150,200)
t.setheading(-120)
t.pendown()
t.circle(200,80)
t.mainloop()
with open (r'C:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines()
for i in a:
print(i)
\ No newline at end of file
data=i.split()
sum=0
for sales in data[1:]:
sum=sum+int(sales)
result=data[0]+':'+str(sum)
print(result)
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