Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- turtle.shape("turtle")
- face = 100
- eye = 13
- nose = 10
- # Draw a color filled circle
- def circle_color(radius, fill_color):
- turtle.begin_fill()
- turtle.circle(radius)
- turtle.fillcolor(fill_color)
- turtle.end_fill()
- turtle.color("black")
- def move_turtle(x_axis, y_axis):
- turtle.penup()
- turtle.goto(x_axis, y_axis)
- turtle.pendown()
- circle_color(face, "yellow")
- move_turtle(-40, 130)
- circle_color(eye, "blue")
- move_turtle(40, 130)
- circle_color(eye, "blue")
- move_turtle(0, 110)
- #Draw a nose
- turtle.right(90)
- turtle.width(7)
- turtle.forward(20)
- move_turtle(-40, 80)
- # Draw a smile
- turtle.width(nose)
- turtle.color("red")
- turtle.circle(40,180)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement