OCR GCSE
Lesson 3 | Python Turtle Workbook (J277)
Iteration (loops)
Mr Haddleton 2020
Python Turtle Lessons OCR GCSE (J277)
Reminder : The Turtle Instructions
import turtle Tell Python to allow use of turtle commands
wn = turtle.Screen() Create a virtual canvas to draw on (Screen)
bob = turtle.Turtle() Create a new turtle called bob
bob.forward(150) Go forward (150 units)
bob.backward(150) Go backward (150 units)
bob.right(90) Turn right (90 degrees)
bob.left(90) Turn left (90 degrees)
bob.penup() Lifts the pen up so you can move the turtle without drawing
bob.pendown() Drops the pen back onto the screen so you can draw
bob.pensize(5) Sets the turtle drawing width to 5 units (1 = thinnest)
bob.fillcolor(“Brown”) Changes the fill colour to brown(or other colour)
bob.pencolor(“Red”) Changes the pen colour to red (or other colour)
bob.begin_fill() Begins to fill the shape
bob.end_fill() End the filling sequence
bob.circle(100) Draw a circle of radius 100 units
Mr Haddleton 2020
Python Turtle Lessons OCR GCSE (J277)
Reminder : Using a loop
This is the FOR loop code.
Remember to indent using
Mr Haddleton 2020
Python Turtle Lessons OCR GCSE (J277)
Task 1 – Draw these shapes using FOR loops
Use the snipping tool to paste a picture of your program outputs below
Paste picture here
Mr Haddleton 2020
Python Turtle Lessons OCR GCSE (J277)
Task 2 – Draw more interesting shapes using FOR loops and the following template code
Use the snipping tool to paste a picture of your program outputs below
No. of points
Angle to turn
Paste picture here
Mr Haddleton 2020
Python Turtle Lessons OCR GCSE (J277)
Task 3 – It’s party time!! - Type in the following code exactly as shown to draw balloons
Use the snipping tool to paste a picture of your program
output below
Paste picture here
Mr Haddleton 2020