wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python turtle year 8 assessment

Total questions: 20

Worksheet time: 12mins

Name
Class
Date
1.
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
2.
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
3.

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

a)

for

b)

if

c)

input

d)

print

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

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

6.

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

7.

What software do you use to write a program in Python?

a)

Word

b)

IDLE

c)

Powerpoint

d)

Excel

8.

What shape will this create?

a)

Triangle

b)

Hexagon

c)

Rectangle

d)

Will look like the turtle is climbing stairs

9.

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.

10.

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

a)

50

b)

90

c)

0

d)

4

11.

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

a)

input

b)

4

c)

int

d)

mylength

12.

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

13.

What is wrong with this code?

a)

Missing Brackets

b)

Missing Comma

c)

Missing Colon

d)

Incorrect spelling

14.

What is wrong with this code?

a)

Missing Brackets

b)

Missing Comma

c)

Missing Colon

d)

Incorrect spelling

15.

What keyword is used to define a function / subprogram in Python?

a)

def

b)

if

c)

while

d)

for

16.
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
17.
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
18.
When creating a def in Python, what is the correct order for the elements?
a)
def ( ) subroutine :
b)
def subroutine : ( )
c)
def subroutine ( ) :
d)
def : ( ) subroutine
19.
To stop the turtle drawing you need to use which of the following commands?
a)
penup:
b)
pen_up( )
c)
penup( )
d)
penup( ):
20.
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