Advertisement
KaySawbridge

Random Circles

Jul 17th, 2020
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. from turtle import Turtle
  2. tommy = Turtle()
  3. def draw_circ(name, r, color, x, y):
  4.     name.color(color)
  5.     name.dot(r*2) # gives diameter
  6.     name.penup()
  7.     name.goto(x, y)
  8.     name.pendown()
  9.  
  10. draw_circ(tommy, 200, 'green', 0, 0)
  11. draw_circ(tommy, 100, 'cyan', 15, 0)
  12. draw_circ(tommy, 50, 'magenta', 100, 0)
  13. draw_circ(tommy, 50, 'purple', -50, 45)
  14. draw_circ(tommy, 10, 'purple', -60, 70)
  15. draw_circ(tommy, 100, 'red', 30, 20)
  16. draw_circ(tommy, 70, 'yellow', -45, -57)
  17. draw_circ(tommy, 50, 'blue', -16, 39)
  18. draw_circ(tommy, 40, 'purple', -16, 39)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement