Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

EOU - Python Turtle - Y7

Total questions: 77

Worksheet time: 1hrs 13mins

Name
Class
Date
1.

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

a)

pendown:

b)

pen_down( )

c)

pendown( )

d)

pendown():

2.

To make the turtle move forward, which command is used?

a)

turtle.penup()

b)

turtle.forward()

c)

turtle.left()

d)

turtle.backward()

3.

To make the turtle move backwards, which command is used?

a)

turtle.penup()

b)

turtle.forward()

c)

turtle.left()

d)

turtle.backward()

4.

What does t.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

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

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

7.

Which commands do we need to fill a shape that we have just drawn?

a)

t.begin_fill () and t.end_fill()

b)

t.begin() and t.fill()

c)

t.fill () and t.fill()

d)

t.begin() and t.end()

8.
To stop the turtle drawing you need to use which of the following commands?
a)
penup:
b)
pen_up( )
c)
penup( )
d)
penup( ):
9.
When you want to hide the turtle pointer on the screen which command should you use?
a)
hide_turtle( )
b)
remove_turtle( )
c)
hideturtle( )
d)
turtle.disappear( )
10.
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
11.

Look at this code, what shape will it make?

a)

Square

b)

Triangle

c)

Rectangle

d)

Hexagon

12.

Look at this code, what shape will it make?

a)

Square

b)

Triangle

c)

Rectangle

d)

Hexagon

13.
When creating a rectangle with the turtle, what angle is needed when turning?
a)
120
b)
180
c)
45
d)
90
14.

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

15.
What will be the output from this code?
a)
Square
b)
Triangle
c)
Circle
d)
Rectangle
16.
What will be the output from this code?
a)
Square
b)
Triangle
c)
Circle
d)
Rectangle
17.
What will be the output from this code?
a)
Square
b)
Triangle
c)

Broken Square

d)
Rectangle
18.
Look at this code, how many times will it loop?
a)
50
b)
90
c)
0
d)
4
19.
What is wrong with this code?
a)
Missing Brackets
b)
Missing Comma
c)
Missing Colon
d)
Incorrect spelling 
20.
What is wrong with this code?
a)
Missing Brackets
b)
Missing Comma
c)
Missing Colon
d)
Incorrect spelling 
21.
What will be the output from this code?
a)
Square
b)
Triangle
c)
Circle
d)
Rectangle
22.
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
23.
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
24.
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
25.

A named memory location used to store values in computer is a ...

a)

Casting

b)

String

c)

Variable

d)

Hard Drive Disk

26.

Choose three properties of a variable below:

a)

Has a name.

b)

Holds a value.

c)

Has a data type.

d)

Has a length.

27.

Choose variable rules from the list below:

a)

Must not begin with a number

b)

Can only contain (A-Z, a-z) and 0-9 characters, and _

c)

Can use _ to join words separated words

d)

Must be in lower case

28.

Choose valid variable names from the list of options given below:

a)

1st_name

b)

Last_name

c)

first Name

d)

f1_name

e)

firstName

29.

In the following code, what type of variable is being created?

foo = "bar"

a)

Integer

b)

Float

c)

String

30.

What does the following python code display? 

a = 3

a += 1

a + 5

print(a)


a)

1

b)

3

c)

4

d)

8

e)

9

31.

What does the following Python code display?

a)

heyy

b)

hola

c)

salut

d)

ohayo

32.

What does the following Python code display?

a)

1 4 3

b)

3 4 1

c)

3 4 3

d)

1 8 4

e)

1 4 8

33.

The boolean values True and False are returned when a conditional expression is compared or evaluated.

a)

True

b)

False

34.

Variables are:

a)

a number

b)

a message input by the user

c)

a secret code

d)

containers for storing data value

35.

In Python, string variables can be declared either by using single quotes ' ' or:

a)

; (semicolon)

b)

" " (double quotes)

c)

# (hash symbol)

d)

( ) (parenthesis)

e)

< > (angle brackets)

36.

print("Python " * 3); will print out what

a)

Python 3 Python 3 Python 3

b)

Python Python Python

c)

PythonPythonPython

d)

Python*3 Python*3 Python*3

37.

What will be the output of

print (a + b)

a)

12

b)

3

c)

1 + 2

d)

"a + b"

38.

In programming, what is iteration?

a)

The repetition of steps within a program

b)

The order in which instructions are carried out

c)

A decision point in a program

d)

Testing a program to make sure it works

39.
Why is iteration important?
a)
It determines the order in which instructions are carried out
b)
It allows code to be simplified by removing duplicated steps
c)
It allows multiple paths through a program
d)
It ensures the code works correctly
40.

What is the key word used for when code is repeated or looped?

a)

Iteration

b)

Isolation

c)

ISO File

d)

Instantaneous

41.

Look at the following code, what will it generate

a)

1,2,3,4,5,6,7,8,9,10,11,12

b)

0,1,2,3,4,5,6,7,8,9,10,11,12

c)

1,2,3,4,5,6,7,8,9,10,11,12,13

d)

0,1,2,3,4,5,6,7,8,9,10,11,12,13

42.
a)
b)
c)
d)

1,2,3,4

43.

What does the following program display?

a)

1,2,3,4

b)

1,2,3,4,5

c)

counter,counter,counter,counter,counter

d)

0,1,2,3,4,5

44.

if you wished a loop to repeat 3 types whwt should you use?

a)

For counter in range(0,5):

b)

For counter in range(1.3):

c)

For counter in range(0.3):

45.

what is the name of the variable used in the following code?

a)

counter

b)

print

c)

for

d)

#

46.
What is the name of the environment in Python that write your programs and then test them out?
a)
Shell
b)
Window
c)
IDLE
d)
CLI
47.
What type of loop is used when you know how many times you want to repeat something?
a)
A WHILE Loop
b)
An IF function
c)
A FOR Loop
d)
A Variable
48.

What type of loop is used when you know how many times you want to Select something?

a)
A WHILE Loop
b)
An IF function
c)
A FOR Loop
d)
A Variable
49.

What type of loop is used when you know how many times you want to repeat something until condition is met?

a)
A WHILE Loop
b)
An IF function
c)
A FOR Loop
d)
A Variable
50.

What is the name of the variable in this program?

a)

print

b)

colour

c)

input

d)

" "

51.

What would be outputted here?

a)

Bigger than 2!

b)

Number is 5

c)

Bigger than 2!

Number is 5

d)

Nothing

52.

What would be outputted here?

a)

it divides by 7!

b)

it divides by 3!

c)

It divides by 7.

d)

It divides by 3.

53.

What would be outputted here?

a)

it divides by 7!

b)

it divides by 3!

c)

It divides by 7.

d)

It divides by 3.

54.
Code executed based on a condition being true
a)
Sequence
b)
Selection
c)
Iteration
d)
Variable
55.

Which of the following shapes is classed as a Process?

56.

Which of the following shapes is classed as a Start/Stop?

57.

Which of the following shapes is classed as a Decision?

58.

Which of the following shapes is classed as Input/Output?

59.

Which of the following shapes is classed as Flow of Direction?

60.
'Is the button pressed?' is a
a)
Process
b)
Delay
c)
Terminator
d)
Decision
61.
'Switch the light on' is a
a)
Process
b)
Delay
c)
Terminator
d)
Decision
62.
'Make a sound' is a
a)
Process
b)
Delay
c)
Terminator
d)
Decision
63.

Which command is used to change the turtle's speed?

a)

turtle.speed()

b)

turtle.setspeed()

c)

turtle.changespeed()

d)

turtle.movespeed()

64.

Which of these commands will make the turtle turn right?

a)

turtle.right()

b)

turtle.turnright()

c)

turtle.rotate()

d)

turtle.turn()

65.

What programming language did we learn?

a)

Scratch

b)

Python

c)

Javascript

66.
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
67.
To move the turtle to  a specific position on the drawing canvas you need to use which of the following commands?
a)
set_pos( )
b)
setpos( ):
c)
setpos
d)
setpos( )
68.

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()

69.

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

a)

for

b)

if

c)

input

d)

print

70.

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()

71.
When you have an error in your code what is the term to summarise finding and fixing that error?
a)
Error checking
b)
Debugging
c)
Syntax finder
d)
Error finder
72.
What will be the output from this code?
a)
Square
b)
Triangle
c)
Circle
d)
Rectangle
73.

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()

74.

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

75.
What is syntax?
a)
Syntax is the word used to describe an error
b)
Syntax is the rules of the programming language
c)
It is used to read information
d)
It is used to output information 
76.
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
77.

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

a)

Nothing

b)

No start_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")