Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
114 views

Python Turtle Lesson 3 - Workbook1

This document is a lesson on using iteration (loops) in Python turtle programs. It provides examples of FOR loops and tasks students to draw shapes using FOR loops, including more complex shapes that involve varying the number of points and angle turned. The final task has students copy and run code that uses loops to draw balloons. Pictures of the output from the tasks are to be pasted into the document. The document reminds students about basic turtle commands and how to use a FOR loop in Python turtle programs.

Uploaded by

b
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views

Python Turtle Lesson 3 - Workbook1

This document is a lesson on using iteration (loops) in Python turtle programs. It provides examples of FOR loops and tasks students to draw shapes using FOR loops, including more complex shapes that involve varying the number of points and angle turned. The final task has students copy and run code that uses loops to draw balloons. Pictures of the output from the tasks are to be pasted into the document. The document reminds students about basic turtle commands and how to use a FOR loop in Python turtle programs.

Uploaded by

b
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

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

You might also like