wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Turtle Quiz

Total questions: 125

Worksheet time: 3hrs 58mins

Name
Class
Date
1.

Who is credited with devising Python turtle graphics?

a)

Seymour Papert

b)

Steve Jobs

c)

Ben Fry

d)

Casey Rhys

2.

What settings can be applied to Python turtle graphics? Tick all those that apply

a)

Position

b)

Color

c)

Orientation

d)

Sound

3.

What attributes can you set to the turtle pen? Tick all those that apply

a)

On / off

b)

Color

c)

Width

d)

Erase

4.

There is an error on this piece of code, what is the correct statement?

a)

screen.bgcolor("lightblue")

b)

screen.bgcolor="lightblue")

c)

screen.bgcolour("lightblue")

d)

screen.bgcolor=lightblue()

5.

What is wrong with this piece of code

a)

Must use the American spelling of colour - "color"

b)

Remove the prefix "screen." on Line 3

c)

Don't write the name of the colour in quote marks

d)

Don't add a capital letter to "Screen"

6.

There is an error on this piece of code, what is the correct statement?

a)

import turtle

b)

import Turtle

c)

import.Turtle

d)

turtle import

7.

There is an error on this piece of code, what is the correct statement?

a)

turtle.forward(150)

b)

turtle.forward()

c)

turtle.moveforward()

d)

turtle.move.forward(150)

8.

There is an error on this piece of code, what is wrong?

a)

Nothing

b)

No begin_fill() set

c)

No colour set in the end fill e.g. end_fill("blue")

d)

No colour set in the start fill e.g. start_fill("blue")

9.

There is an error on this piece of code, what is wrong?

a)

Nothing

b)

No full stop needed in the pen.down statement e.g. turtle.pendown()

c)

No brackets needed in the pen.down statement e.g. turtle.pen.down

d)

No turtle prefix needed in the pen.down statement e.g. pen.down()

10.

There is an error on this piece of code, how should it be written?

a)

There is no error

b)

screen=turtle.screen()

c)

screen=turtle.Screen()

d)

screen=turtle.screen("blue")

11.

There is an error on this piece of code, how should it be written?

a)

There is no error

b)

screen=turtle.screen()

c)

screen=turtle.Screen()

d)

screen=turtle.screen("blue")

12.

There is an error on this piece of code, how should it be written?

a)

There is no error

b)

turtle.right(90)

c)

turn.right(90)

d)

right(90)

13.

There is an error on this piece of code, how should it be written?

a)

There is no error

b)

turtle.right(90)

c)

turtle.drawcircle(10)

d)

import.turtle

14.

What is the best method of fixing errors in your code?

a)

Running and testing the code

b)

Asking your friends

c)

Reading it through again

d)

All of the above

15.
Look at this code, how many times will it loop?
a)
50
b)
90
c)
0
d)
4
16.
Look at this code, what shape will it make?
a)
Square
b)
Triangle
c)
Rectangle
d)
Hexagon 
17.
What is wrong with this code?
a)
Missing Brackets
b)
Missing Comma
c)
Missing Colon
d)
Incorrect spelling 
18.
What is wrong with this code?
a)
Missing Brackets
b)
Missing Comma
c)
Missing Colon
d)
Incorrect spelling 
19.
What will be the output from this code?
a)
Square
b)
Triangle
c)
Circle
d)
Rectangle
20.
What will be the output from this code?
a)
Square
b)
Triangle
c)
Circle
d)
Rectangle
21.
What will be the output from this code?
a)
A star with an orange outline
b)
A solid orange star
c)
A pentagon with an orange outline
d)
A solid orange pentagon
22.
What will be the output from this code?
a)
A pentagon with an orange outline
b)
A solid orange star
c)
A star with an orange outline
d)
A solid orange pentagon
23.
What will be the output from this code?
a)
A star with an orange outline
b)
A solid orange star
c)
A pentagon with an orange outline
d)
A solid orange pentagon
24.
This code should draw a solid orange square but it is not correct. How many errors are there?
a)
1
b)
2
c)
3
d)
4
25.
What is the output from this code?
a)
A sequence of four orange triangles
b)
An orange triangle and an orange square
c)
A sequence of three orange squares
d)
Error
26.
This code should draw a square with an orange outline but it is not correct. How many errors are there?
a)
1
b)
2
c)
3
d)
4
27.

To start the turtle drawing you need to use which of the following commands?

a)

penup()

b)

pen_down( )

c)

pendown( )

d)

penup( ):

28.
When using a command to move the turtle to a specific position on the drawing canvas, the middle of the canvas is represented by which coordinates?
a)
1, 1
b)
100, 100
c)
0, 0
d)
500, 500
29.

How do you tell that Python that you are going to use the turtle library?

a)

import_turtle

b)

turtle import

c)

import turtle

d)

from turtle import

30.
To make the turtle move forward, which command is used?
a)
turtle.penup()
b)
turtle.forward()
c)
turtle.left()
d)
turtle.backward()
31.
When creating a rectangle with the turtle, what angle is needed when turning?
a)
120
b)
180
c)
45
d)
90
32.
To fill a shape with the colour red, which command is correct?
a)
turtle.fillcolor('Red')
b)
turtle.fillcolour('Red')
c)
turtle.fillcolor("Red")
d)
turtle.fillcolour("Red")
33.
In order to move the turtle 120 forward without drawing on the screen, which order is correct?
a)
turtle.forward(120)
turtle.penup()
turtle.pendown()
b)
turtle.pendown()
turtle.forward(120)
turtle.penup()
c)
turtle.penup()
turtle.forward(120)
turtle.pendown()
34.
What is the extension on a Python file name?
a)
.py
b)
.xls
c)
.doc
d)
.ppt
35.
What does this code do?
a)
Draws a red rectangle
b)
Draws a red triangle
c)
Draws a red square
d)
Draws a black square
36.
What sort of error has happened if you forget to include : when you need one?
a)
Logical
b)
Forgotten colon
c)
Runtime
d)
Syntax
37.
What does forward(300) do?
a)
Moves in the direction it is facing 300 steps
b)
Moves down the screen 300 steps
c)
Moves up the screen 300 steps
38.
What does turn(90) do?
a)
Turns right 90 degrees
b)
Turns left 90 degrees
c)
Moves forward 90
d)
Does nothing as 'turn' is not a turtle instruction
39.
What is the window called where you write your code?
a)
Editor
b)
Shell
40.

Which of these commands would successfully create a turtle named Alice

a)

Alice = turtle.turtle()

b)

Alice = Turtle.turtle()

c)

Alice = Turtle.Turtle()

d)

Alice = turtle.Turtle()

41.

What happens if you call your python progam "turtle"

a)

your program crashes because you have spelt it wrong

b)

your program crashes because it stops the import turtle line from working

c)

your program crashes because it should have been saved as turtle.turtle

d)

your program runs fine

42.

Which of these statements will successfully set the colour that the turtle Bob draws in

a)

Bob.fillcolor("red")

b)

Bob.pencolor("Red")

c)

pencolor.bob = "red"

d)

pencolor("red") = Bob

43.

Why are while loops useful?

a)

They mean you don't have to think about the code that you write

b)

They mean that you have to write more code to get the same result

c)

They mean that you don't need to import the turtle library

d)

They mean you can repeat instructions without needing to type them out multiple times

44.

Why might programming a python turtle be a useful skill?

(select 2 answers)

a)

It allows me to improve my problem solving skills

b)

It allows me to solve my maths homework easily

c)

It allows me to practice logical sequences of instructions, which can be useful in life

d)

It allows me to hack, and therefore take shortcuts in life.

45.
To make the turtle move forward, which command is used?
a)
turtle.penup()
b)
turtle.forward()
c)
turtle.left()
d)
turtle.backward()
46.

What will this draw?

a)

A Brown rectangle with yellow outline

b)

A Brown Square with a Red outline

c)

A Red Square with a Red Outline

d)

A Yellow Rectangle with a purple outline

47.

What is the keyword needed to repeat code (iterate) in Python?

a)

for

b)

if

c)

input

d)

print

48.

To fill the shape with the colour red (using a different colour outline), which command is best?

a)

color("red")

b)

fillcolor("red")

c)

fill("red")

d)

fillcolour("red")

49.

What does this code do?

sides = int(input("How many sides would you like? "))

a)

Nothing, its witchcraft

b)

Creates an input variable asking the user to input a number

c)

Tells the turtle to move in a direction.

d)

Tells the turtle to turn a number of times.

50.

Look at this code, which of these is a variable?

a)

input

b)

4

c)

int

d)

mylength

51.

What is the best definition of iteration?

a)

Repeating an instruction 5 times

b)

Repeating an instruction an unlimited number of times

c)

Code

d)

Repeating an instruction until a goal is met

52.

What is wrong with this code?

a)

Missing Brackets

b)

Missing Comma

c)

Missing Colon

d)

Incorrect spelling

53.
This code should draw a solid orange square but it is not correct. How many errors are there?
a)
1
b)
2
c)
3
d)
4
54.
To stop the turtle drawing you need to use which of the following commands?
a)
penup:
b)
pen_up( )
c)
penup( )
d)
penup( ):
55.
What is an Algorithm?
a)
A set of instructions in order
b)
A task for the computer
56.
What is the purpose of a flowchart?
a)
To plan the program before it is made
b)
Because it is easier
57.
Why do we use flowcharts?
a)
To represent algorithms in an easy way
b)
To use different maths shapes
58.
What does this symbol represent?
a)
Start
b)
Sub
c)
Decision
d)
Process
59.
What is this symbol used for in a flowchart?
a)
A decision/question
b)
A task to carry out
60.
What symbol do flowcharts begin with?
a)
oval
b)
parallelogram
c)
rectangle
d)
diamond
61.
What is the name of this symbol in a flowchart?
a)
Input
b)
Output
c)
Decision/Question
d)
Process
62.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
63.
What's missing from this part of a flowchart?
a)
An Arrow
b)
A Line
c)
A Square
d)
A Diamond
64.
What is the purpose of an arrow in a flowchart?
a)
Shows the relationships between shapes/ the flow of information
b)
They look nice when we use them
c)
We don't use arrows
d)
Shows the way the arrow is directed
65.
Can this shape be used for both Start and Stop?
a)
Yes
b)
No
66.
What symbol shows a decision?
a)
oval
b)
parallelogram
c)
rectangle
d)
diamond
67.

What symbol shows something you need to do?

a)

oval

b)

parallelogram

c)

rectangle

d)

diamond

68.

Which symbol shows input?

a)

oval

b)

parallelogram

c)

rectangle

d)

diamond

69.

Which symbol shows output?

a)

oval

b)

parallelogram

c)

rectangle

d)

diamond

70.
If I want to use a loop to make sure I check my math answers exactly three times, which loop would I use?
a)
for
b)
while
71.
Which loop can you use for an exact number of times?
a)
for
b)
while
72.
Which symbol show sequence, direction of flow, or the order in which a chart is read?
a)
diamond
b)
parallelogram
c)
retangle
d)
arrow
73.
What is used to connect the flowchart symbols together?
a)
Rectangles
b)
Lines
c)
Arrows
d)
Patterns
74.

A logical step-by-step process for solving a problem is called

a)

Binary Numbers

b)

Coding

c)

Algorithms

75.

A diagram that represents a set of instructions is called:

a)

Flow Chart

b)

Pseudocode

c)

Shapes

76.

Data sent from a Computer is called

a)

Input

b)

Output

c)

Process

77.
What would be the output of this flowchart if the student scored 89?
a)
Fail
b)
Pass
c)
Merit
d)
Distinction
78.
Identify a variable within this flowchart.
a)
INPUT
b)
Start
c)
12
d)
RESULT
79.

Why do computers use algorithms?

a)

To give computers precise steps to solve a problem.

b)

Because they are easy to use

c)

It is the language that computers understand

d)

To help them predict the future

80.

What does sequence mean?

a)

To create a pattern

b)

To do something in order

c)

To do something randomly

d)

To repeat something over and over again

81.

What does selection mean?

a)

Selection is following instructions in order.

b)

Selection is to repeat something over and over again

c)

Selection is when you have a choice of options

d)

Selection is choosing the best option

82.
What is the Output if the user enters:
Yes
a)
Leave umbrella at home
b)
Take an umbrella
83.
What is the Output if the temperature is:
19
a)
Below Freezing
b)
Above Freezing
84.

What will happen if the user gets their details wrong?

a)

Checks how many times they have tried

b)

They get another try

85.

What will happen if the user's book return is late?

a)

Sends them an SMS (text)

b)

Does not send them an SMS (text)

86.

Complete the flowchart

a)
b)
c)
d)
87.

complete the flowchart

a)
b)
c)
d)
88.

Complete the flowchart

a)
b)
c)
d)
89.

Complete the flowchart

a)
b)
c)
d)
90.

What is printed at the end if you enter 6?

a)

The answer is : 6

b)

The answer is var-answer

c)

The answer is : 10+6

d)

The answer is : 16

91.
Which data type is used to store:
100
a)
Integer
b)
Double
c)
Boolean
d)
String
92.
Which data type is used to store:
TRUE
a)
Boolean
b)
Double
c)
String
d)
Integer
93.

What is a Constant?

a)

A storage location of memory which does not change

b)

A random area to store things in.

c)

Something that changes

d)

Something that can only store numbers

94.

What will happen if the user gets their details wrong?

a)

Checks how many times they have tried

b)

They get another try

95.
How many arrows should come out of a decision symbol in a flowchart?
a)
0
b)
1
c)
2
d)
3
96.

Whats wrong with this program?

t=turtle.Turtle()

t.forward(100)

t.right(90)

t.forward(100)

t.right(90)

t.forward(100)

t.right(90)

t.forward(100)

t.right(90)

a)

Nothing is wrong. The code will work.

b)

Missing import turtle.

c)

t.right(90) is not a valid syntax.

d)

t.forward(100) is not a valid syntax.

97.

What is the error in the code?

import turtle

c=turtle.Turtle()

for step in range(4)

c.forward(100)

c.right(90)

a)

No error.

b)

Missing colon(:)

c)

Cannot name my turtle c.

d)

cannot use the variable name step.

98.

To stop the turtle drawing you need to use which of the following commands?

a)

penup()

b)

penup

c)

pen_up()

d)

pendown()

e)

penup():

99.

What command do you use to move the turtle to a particular position?

a)

forward()

b)

right()

c)

goto(x,y)

d)

backward()

e)

left()

100.

What command do you use to change the speed of the turtle?

a)

shape()

b)

speed()

c)

color()

d)

write()

e)

forward()

101.

What command do you use to write text to the screen?

a)

penup()

b)

pendown()

c)

write()

d)

shape()

e)

color()

102.

In python, what function gives access to use various useful functions?

a)

import turtle

b)

import random

c)

import math

d)

import module

103.

Which function in python generates random numbers?

a)

from random

b)

import randint

c)

turtle.turtle()

d)

import turtle

104.

Which keyword in turtle moves the turtle forward?

a)

right()

b)

left()

c)

forward()

d)

backward()

105.

Which keyword in turtle makes the turtle turn right?

a)

right()

b)

left()

c)

forward()

d)

backward()

106.

What keyword in turtle sets the color of the turtle?

a)

color()

b)

bgcolor()

c)

fillcolor()

d)

begin_fill()

107.

What keyword sets the shape of the turtle?

a)

penup()

b)

pendown()

c)

shape()

d)

write()

e)

speed()

108.

I want to move turtle to the left,top position. What is the position i need to specify?

a)

goto(0,0)

b)

goto(x,y)

c)

goto(-x,y)

d)

goto(-x,-y)

e)

goto(x,-y)

109.

I want to move the turtle to right, top position. What is the right command?

a)

goto(0,0)

b)

goto(x,y)

c)

goto(-x,y)

d)

goto(-x,-y)

e)

goto(x,-y)

110.

I want to move the turtle to right, bottom position. what is the correct syntax?

a)

goto(x,-y)

b)

goto(0,0)

c)

goto(x,y)

d)

goto(-x,y)

e)

goto(-x,-y)

111.

I want to move the turtle to left, bottom position. what is the syntax?

a)

goto(-x,y)

b)

goto(0,0)

c)

goto(-x,-y)

d)

goto(x,y)

e)

goto(x,-y)

112.

What is the keyword to select the graphics screen in turtle?

a)

Screen()

b)

bgcolor()

c)

end_fill()

d)

begin_fill()

113.

What is the keyword in turtle that changes the background color of the graphics screen?

a)

bg_color()

b)

bg.color()

c)

bgcolor()

d)

bgcolor():

114.

What is the keyword in turtle that changes the turtle color to fill the color inside the shape?

a)

color()

b)

fillcolor()

c)

fill.color()

d)

begin_fill()

e)

fillcolor():

115.

What is the keyword in turtle that begins to fill the color inside the shape?

a)

beginfill()

b)

begin_fill()

c)

begin.fill()

d)

begin_fill():

e)

fillcolor()

116.

What is the keyword in turtle that stops color filling?

a)

end_fill()

b)

end.fill()

c)

stop.fill()

d)

stop_fill()

117.

What is the error in this code?


import turtle

for i in range(5):

turtle.forward(150)

turtle.right(144)

a)

There is no error.

b)

Turtle is not named.

c)

import turtle missing ()

d)

The syntax is turtle=forward(150)

118.

What is the error in this code?

import turtle

t=turtle.Turtle()

for i in range(5):

c.forward(100)

c.left(144)

a)

Name error

b)

Spelling error

c)

syntax error

d)

No error

119.

Is there error in this code?

import turtle

t = turtle.Turtle()

t=turtle.screen()

t.bgcolor("light pink")

c=turtle.color("light blue")

turtle.fillcolor("red")

t=turtle.begin_fill()

for flower in range(10):

turtle.right(200)

turtle.circle(30)

t=turtle.end_fill()

a)

Attribute error

b)

spelling error

c)

syntax error

d)

There is no error.

120.

I want to write a code to to draw blue circle with pink background and fill it with orange color. Will this code work?

import turtle

t = turtle.Turtle()

t=turtle.Screen()

t.bgcolor("light pink")

c=turtle.color("light blue")

turtle.fillcolor("red")

t=turtle.begin_fill()

for flower in range(10):

turtle.right(200)

turtle.circle(30)

t=turtle.end_fill()

a)

Yes

b)

No

121.

Does the code has error?


import turtle

t = turtle.Turtle()

t=turtle.Screen()

t.bgcolor("light pink")

c=turtle.color("light blue")

turtle.fillcolor("red")

t=turtle.begin_fill()

for flower in range(10)

turtle.right(200)

turtle.circle(30)

t=turtle.end_fill()

a)

There is no error.

b)

Syntax error

c)

Attribute error

d)

spelling error

122.

What is the error?

import turtle

t = turtle.Turtle()

t=turtle.Screen()

t.bgcolor("light pink")

c=turtle.color("light blue")

turtle.fillcolor("red")

t=turtle.begin_fill("red")

for flower in range(10):

turtle.right(200)

turtle.circle(30)

t=turtle.end_fill()

a)

syntax error

b)

type error

c)

attribute error

d)

spelling error

e)

No error

123.

What is the error?

import turtle

t = turtle.Turtle()

for star in range(5):

t.foward(100)

t.right(90)

a)

spelling error

b)

no error

c)

syntax error

d)

value error

124.

Will this code write the word hello as output:

import turtle

c=turtle.Turtle()

c.write(hello)

a)

Yes, it will.

b)

turtle doesn't identify write()keyword

c)

Missing quotation marks("")

d)

Missing print()

125.

Will this code run:

import turtle

c=turtle.Turtle

c.penup()

c.goto(-140,140)

c.pendown()

for step in range(15):

c.write(step)

c.right(90)

c.forward(20)

c.pendown()

c.forward(150)

c.penup()

c.backward(160)

c.left(90)

c.forward(20)

a)

No error

b)

external error. Missing parentheses ()

c)

spelling error

d)

Type error