0% found this document useful (0 votes)
14 views4 pages

Aaaa

This document contains a Python script that uses the Turtle graphics library to draw a cartoon face resembling Mickey Mouse. It includes functions to create the face, ears, eyes, pupils, nose, mouth, and adds text below the face. The script sets up the drawing environment and waits for a click to exit.

Uploaded by

aditya
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)
14 views4 pages

Aaaa

This document contains a Python script that uses the Turtle graphics library to draw a cartoon face resembling Mickey Mouse. It includes functions to create the face, ears, eyes, pupils, nose, mouth, and adds text below the face. The script sets up the drawing environment and waits for a click to exit.

Uploaded by

aditya
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/ 4

import turtle as t

# Setup

pen = t.Turtle()

t.bgcolor('#9966cc')

t.delay(8)

# Draw the face (black outline with skin color fill)

pen.color('black', '#ffe4e1')

pen.begin_fill()

pen.circle(100) # Main face

pen.end_fill()

# Draw the left ear (black with a yellow inner circle)

pen.up()

pen.setpos(-120, 120)

pen.down()

pen.color('black', 'black') # Black fill

pen.begin_fill()

pen.circle(50)

pen.end_fill()

pen.color('black', 'yellow') # Yellow inner circle

pen.begin_fill()

pen.circle(20)

pen.end_fill()

# Draw the right ear (black with a yellow inner circle)

pen.up()
pen.setpos(120, 120)

pen.down()

pen.color('black', 'black') # Black fill

pen.begin_fill()

pen.circle(50)

pen.end_fill()

pen.color('black', 'yellow') # Yellow inner circle

pen.begin_fill()

pen.circle(20)

pen.end_fill()

# Draw the eyes

pen.up()

pen.setpos(-40, 50)

pen.down()

pen.color('black', 'white') # White eye

pen.begin_fill()

pen.circle(15)

pen.end_fill()

pen.up()

pen.setpos(40, 50)

pen.down()

pen.color('black', 'white') # White eye

pen.begin_fill()

pen.circle(15)

pen.end_fill()
# Draw the pupils

pen.up()

pen.setpos(-40, 55)

pen.down()

pen.color('black', 'black') # Black pupil

pen.begin_fill()

pen.circle(5)

pen.end_fill()

pen.up()

pen.setpos(40, 55)

pen.down()

pen.color('black', 'black') # Black pupil

pen.begin_fill()

pen.circle(5)

pen.end_fill()

# Draw the nose

pen.up()

pen.setpos(0, 30)

pen.down()

pen.color('black', 'black') # Black nose

pen.begin_fill()

pen.circle(10)

pen.end_fill()

# Draw the mouth

pen.up()

pen.setpos(-50, -10)
pen.setheading(-60)

pen.down()

pen.color('black', 'red') # Red mouth

pen.begin_fill()

pen.circle(50, 120)

pen.end_fill()

# Add text

def txt():

pen.up()

pen.setpos(-30, -140)

pen.color('white')

pen.write('Mickey', font=("Comic Sans MS", 16, "bold"))

txt()

t.exitonclick()

You might also like