0% found this document useful (0 votes)
250 views

Python Turtle Lesson 1 - Workbook

This document is an introduction to using the Python turtle module. It explains how to import turtle, create a turtle object, and open a window. It then demonstrates basic turtle commands like forward, backward, left, and right to move the turtle and draw shapes. The document provides code examples to draw a square and presents 5 challenges to write programs to draw other shapes using turtle commands.

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)
250 views

Python Turtle Lesson 1 - Workbook

This document is an introduction to using the Python turtle module. It explains how to import turtle, create a turtle object, and open a window. It then demonstrates basic turtle commands like forward, backward, left, and right to move the turtle and draw shapes. The document provides code examples to draw a square and presents 5 challenges to write programs to draw other shapes using turtle commands.

Uploaded by

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

1

on
ss
Le

Introduction to Python Turtle


Lesson 1
How to open Python

Step 1:
Your Python screen looks like this

This is what the Python Shell


looks like and you can only
write one line of code at a
time. It is called the “IDLE”
window. DO NOT USE

This EDIT window looks like


a ‘text editing’ app without
the three arrows on the left
margin. It is called the
“script” window. You can
write many lines of code
here.
Start Python Turtle

• Must import the turtle function:


import turtle

• To create and name the turtle:


bob = turtle.Turtle()

• Create a window for the turtle to appear in:


wn = turtle.Screen()
Go forward – distance to travel forward
 bob.forward(150)

Go back – distance to travel back


 bob.backward(100)
Turn right – turns the turtle to the right .
bob.right(90)

Turn left - turns the turtle to the left


 bob.left(90)
How to draw a square

import turtle
wn = turtle.Screen()
bob = turtle.Turtle()
bob.forward(150)
bob.right(90)
bob.forward(150)
bob.right(90)
bob.forward(150)
bob.right(90)
bob.forward(150)

Do not save as ‘TURTLE.PY’ – Save as SQUARE.PY for example


Challenge 1
Write a new python turtle program to draw this shape

Paste your code here


(hint : use snipping tool)

Do not save as ‘TURTLE.PY’ – Save as SQUARE.PY for example


Challenge 2
Write a new python turtle program to draw this shape

Paste your code here


(hint : use snipping tool)

Do not save as ‘TURTLE.PY’ – Save as L.PY for example


Challenge 3
Write a new python turtle program to draw this shape

Paste your code here


(hint : use snipping tool)

Do not save as ‘TURTLE.PY’ – Save as shape1.PY for example


Challenge 4
Write a new python turtle program to draw this shape

Paste your code here


(hint : use snipping tool)

Do not save as ‘TURTLE.PY’ – Save as H.PY for example


Challenge 5
Write a new python turtle program to draw this shape

Paste your code here


(hint : use snipping tool)

Do not save as ‘TURTLE.PY’ – Save as triangle.PY for example

You might also like