Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import turtle
  2. def window(colr, ttle):
  3. w = turtle.Screen()
  4. w.bgcolor(colr)
  5. w.title(ttle)
  6. return w
  7.  
  8. def turtle(colour, size):
  9. t = turtle.Turtle()
  10. t.color(colour)
  11. t.pensize(size)
  12. return t
  13. def circle(pt1, diam):
  14. arc = diam * 3.14159265358979332 / 360
  15. for i in range(0,360):
  16. pt1.forward(arc)
  17. pt1.left(1)
  18.  
  19. wn = window("lightgreen", "Task 6")
  20. t1 = turtle("hotpink", 5)
  21.  
  22. circle(t1, 100)
  23. wn.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement