Python Turtle? Let’s Recap!
Looking at the following code can you explain the purpose of each Python Turtle instructions:
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:
A protractor is an instrument used in Maths when measuring or drawing angles.
Our challenge is to use Python to draw a protractor on screen, using all the graduations for a scale going from 0° to 180°.
To do so we will use an iterative algorithm based on the following flowchart:
Your task consists of using Python code to implement this flowchart using Python Turtle.
Extension Task #1
Improve the drawing of your protractor further by:
- adding labels (e.g. 0°, 10°, etc.) next to each graduation,
- adding smaller graduations (e.g. 5°, 15°, 25° etc. graduations).
Extension Task #2
Use a similar approach to draw an analogue clock using Python Turtle.
Solution...The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area