Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. import turtle
  2. turtle.shape("turtle")
  3. face = 100
  4. eye = 13
  5. nose = 10
  6.  
  7. # Draw a color filled circle
  8. def circle_color(radius, fill_color):
  9.     turtle.begin_fill()
  10.     turtle.circle(radius)
  11.     turtle.fillcolor(fill_color)
  12.     turtle.end_fill()
  13.     turtle.color("black")
  14.  
  15. def move_turtle(x_axis, y_axis):
  16.     turtle.penup()
  17.     turtle.goto(x_axis, y_axis)
  18.     turtle.pendown()
  19.  
  20. circle_color(face, "yellow")
  21. move_turtle(-40, 130)
  22.  
  23. circle_color(eye, "blue")
  24. move_turtle(40, 130)
  25.  
  26. circle_color(eye, "blue")
  27. move_turtle(0, 110)
  28.  
  29. #Draw a nose
  30. turtle.right(90)
  31. turtle.width(7)
  32. turtle.forward(20)
  33.  
  34. move_turtle(-40, 80)
  35.  
  36. # Draw a smile
  37. turtle.width(nose)
  38. turtle.color("red")
  39. turtle.circle(40,180)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement