0% found this document useful (0 votes)
13 views3 pages

Graphics

Uploaded by

Avelino Salgatar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Graphics

Uploaded by

Avelino Salgatar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

import turtle

# Initialize the turtle

t = turtle.Turtle()

# Set up the speed of the turtle (1-10)

t.speed(3)

# Head

t.penup()

t.goto(0, -100)

t.pendown()

t.color("yellow")

t.begin_fill()

t.circle(100)

t.end_fill()
# Eyes

t.penup()

t.goto(-40, 50)

t.pendown()

t.color("white")

t.begin_fill()

t.circle(20)

t.end_fill()

t.penup()

t.goto(40, 50)

t.pendown()

t.begin_fill()

t.circle(20)

t.end_fill()

# Pupils

t.penup()

t.goto(-40, 60)

t.pendown()

t.color("black")

t.begin_fill()

t.circle(10)

t.end_fill()

t.penup()

t.goto(40, 60)

t.pendown()

t.begin_fill()
t.circle(10)

t.end_fill()

# Mouth

t.penup()

t.goto(-40, 20)

t.pendown()

t.right(90)

t.circle(40, 180)

# Nose

t.penup()

t.goto(0, 40)

t.pendown()

t.dot(20, "black")

# Hide the turtle and display the window

t.hideturtle()

turtle.done()

You might also like