Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python turtle

Total questions: 50

Worksheet time: 28mins

Name
Class
Date
1.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
2.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
3.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

'Dave'

c)

name

d)

(name)

4.
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
5.

What type of programming can be done with Mblock?(choose two)

a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
6.
Which statement correctly assigns the string "Tanner" to the variable name?
a)
name  = print( "Tanner")
b)
input("Tanner")
c)
name = "Tanner"
d)
name = input("Tanner")
7.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
8.

What is the Python built-in function used to display numbers and text on the screen?

a)

print

b)

input

c)

output

d)

command

9.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
10.
In python the ' INTEGER data type' can be defined as...?
a)
holds alphanumeric data as text
b)
holds whole numbers
c)
holds numbers with a decimal point
d)
holds either ‘true’ or ‘false’
11.
In python the ' STRING data type' can be defined as...?
a)
holds alphanumeric text
b)
hold whole numbers
c)
holds numbers with a decimal point
d)
holds either a true or false value
12.
In python the ' FLOAT data type' can be defined as...?
a)
holds alphanumerical data
b)

holds whole numbers

c)

holds a decimal point in a number

d)
hold either true or false
13.
In python the ' BOOLEAN data type' can be defined as...?
a)
holds alphanumerical data
b)
holds whole numbers
c)
holds a number with a decimal point
d)
holds either true or false
14.

What does this code do?


hunter.color("yellow")

hunter.begin_fill()

hunter.circle(100)

hunter.end_fill()

a)

Makes a yellow-filled circle

b)

Makes a yellow circle that is not filled in

c)

Makes a black circle that is not filled in

d)

Makes a white (invisible) circle

15.

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

a)

import turtle

b)

turtle import

c)

from turtle import *

d)

from turtle import

16.
Look at this code, what shape will it make?
a)
Square
b)
Triangle
c)
Rectangle
d)
Hexagon 
17.

Which of these commands would create a turtle named Alice?

a)

Alice = turtle.pen()

b)

Alice = Turtle.pen()

c)

Alice = Turtle.turtle()

d)

Alice = turtle.Turtle()

18.

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

19.

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

a)

turtle.penup()

b)

turtle.forward()

c)

turtle.left()

d)

turtle.backward()

20.

2. What is turtle programming?

a)

a computer program that draws

b)

a real life animal that draws

c)

a real life animal inside a comouter

21.

4. To give turtle its shape, which is the right command?

a)

name.shape("turtle")

b)

name.structure("turtle")

c)

name.shape("turtle animal")

22.

5. To move turtle forward, which is the right command?

a)

name.front(100)

b)

name.moveforward(100)

c)

name.forward(100)

23.

7. To make turtle turn right, which is the right command?

a)

name.right(90)

b)

name.left(90)

c)

name.up(90)

24.

True or False: turtle.hideturtle() will cause the turtle to disappear in the window.

a)

True

b)

False

25.
what does IF statement do
a)
closes the program
b)
makes a decision
c)
asks a question
26.

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

a)

turtle.penup()

b)

turtle.forward()

c)

turtle.left()

d)

turtle.backward()

27.

When creating a rectangle with the turtle, what angle is needed when turning?

a)

120

b)

180

c)

45

d)

90

28.

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

29.

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

30.

What is the extension on a Python file name?

a)

.py

b)

.xsl

c)

.ppt

d)

.docx

31.

How do you write a program in Python?

a)

Using Word

b)

Using IDLE

c)

Using Powerpoint

d)

Using Excel

32.

What is the window called where you write your code?

a)

Editor

b)

Shell

33.

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

34.

Which of these commands would successfully create a turtle named Alice

a)

Alice = turtle.pen()

b)

Alice = Turtle.pen()

c)

Alice = Turtle.Pen()

d)

Alice = turtle.Pen()

35.

How do you tell python you want to use the turtle library

a)

turtle import

b)

import turtle

c)

from libraries import turtle

d)

from turtle import libraries

36.

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

a)

for

b)

if

c)

input

d)

print

37.

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

38.

Look at this code, how many times will it loop?

a)

50

b)

90

c)

0

d)

4

39.

What shape will this create?

a)

Triangle

b)

Rectangle

c)

Hexagon

d)

Will look like the turtle is climbing stairs

40.

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

41.

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

a)

penup:

b)

pen_up

c)

penup()

d)

penup():

42.

In order to move the turtle 120 forward without drawing on the screen, which order is correct?

a)

forward(120)

penup()

pendown()

b)

pendown()

forward(120)

penup()

c)

penup()

forward(120)

pendown()

43.
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( )
44.
When creating a rectangle with the turtle, what angle is needed when turning?
a)
120
b)
180
c)
45
d)
90
45.

What ‘object’ do you control in Python turtle?

a)

The pen object which draws your commands

b)

The shape object which draws your commands

c)

The pencil object which draws your commands

d)

The turtle object which draws your commands

46.

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

47.
What will the output be from the following code?
print("Hello world!")
a)
SyntaxError
b)
Hello world!
c)
"Hello world!"
d)
print(Hello world!)
48.

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

49.
Look at this code, what shape will it make?
a)
Square
b)
Triangle
c)
Rectangle
d)
Hexagon 
50.

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