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()