Optical Illusions

illusion-1

Which of the above two purple circles is bigger?

Learning Objectives


In this challenge you will use Python Turtle to draw geometric shapes and optical illusions.

To help you we have created three functions as follows:

  • drawLine() to draw a straight lines between two points,
  • drawSquare() to draw a square of a given size and colour,
  • drawCircle() to draw a circle of a given size and colour.

To position these shapes on the screen you will need to use x,y coordinates and pass these coordinates when using the three functions given above.

(X,Y) Coordinates


The canvas we are drawing on (using Python Turtle) is 400 pixels wide by 400 pixels high.
Look at the canvas below to understand how (x,y) coordinates work:
xy-coordinates

Check the code

Your Challenge

Complete the code given to draw the following optical illusions:

illusion-1

Which of the above two purple circles is bigger?

illusion-2

Which of the above two lines is longer?

illusion-3

Which of the above two lines is longer?

illusion-4

Are both purple lines perfectly straight?

illusion-5

Are all the white dots really white?

illusion-6

Share Button
Posted in Computer Science, Python - Beginner, Python Challenges Tagged with: ,

Our Latest Book

Follow this blog