Cat’s Eyes In Python Turtle
Create your own masterpiece

In this lesson your challenge is to take what you have learned so far and create something wonderful.
Here is an example:
On a midnight blue background a pair of pale yellow cat’s eyes appear. They blink and disappear then reappear at a random spots. They appear and disappear 4 times before appearing for a final time and remaining on the screen.
Look at the code and create your own masterpiece.
import turtle as T
import random
for i in range (4):
loc = random.randrange(-200,200)T.bgcolor ("midnight blue")
T.color ("light yellow")
T.hideturtle()# create pair of eyesT.penup()
T.goto (loc,loc)
T.pendown()
T.begin_fill ()
T.circle (-20,90)
T.penup()
T.goto (loc,loc)
T.pendown()
T.circle (20,90)
T.end_fill()T.right (45)
T.penup()
T.forward (20)
T.left (45)T.begin_fill ()
T.circle (-20,90)
T.right(90)
T.circle (-20,90)
T.end_fill()# cover eyes to make them disappearT.color ("midnight blue")T.penup()
T.goto (loc,loc)
T.right(90)
T.pendown()
T.begin_fill ()
T.circle (-20,90)
T.penup()
T.goto (loc,loc)
T.pendown()
T.circle (20,90)
T.end_fill()T.right (45)
T.penup()
T.forward (20)
T.left (45)T.begin_fill ()
T.circle (-20,90)
T.end_fill()
T.right(90)
T.begin_fill()
T.circle (-20,90)
T.end_fill()# final pair of eyesloc = random.randrange(-200,200)
T.color ("light yellow")T.penup()
T.goto (loc,loc)
T.pendown()T.begin_fill ()
T.circle (-20,90)
T.penup()
T.goto (loc,loc)
T.pendown()
T.circle (20,90)
T.end_fill()T.right (45)
T.penup()
T.forward (20)
T.left (45)T.begin_fill ()
T.circle (-20,90)
T.end_fill()T.right(90)T.begin_fill()
T.circle (-20,90)
T.end_fill()Jim McAulay🍁 says “So far 2020 is like looking both ways before crossing the street and then getting hit by a plane.”
81–79







