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