wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Grade 8

Total questions: 17

Worksheet time: 9mins

Name
Class
Date
1.
Look at this code, how many times will it loop?
a)
50
b)
90
c)
0
d)
4
2.

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

a)

turtle.penup()

b)

turtle.forward()

c)

turtle.left()

d)

turtle.backward()

3.

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

a)

120

b)

180

c)

45

d)

90

4.

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

5.

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

6.

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

7.

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

8.

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

a)

50

b)

90

c)

0

d)

4

9.

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

a)

penup:

b)

pen_up

c)

penup()

d)

penup():

10.
Which line is correct?
a)
from turtle import *
b)
from Turtle import *
c)
from turtle inport *
d)
form turtle import *
11.

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"

12.

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

13.
What will be printed after running this FOR loop:

for number in range(6):
 
    print(number)
a)
The number 6 
b)
The numbers 0 - 5
c)
The number 5
d)
The numbers 1 - 6
14.

This loop can only be used when the programmer knows the number of times a code is to be repeated

a)

while

b)

for

c)

do while

d)

repeat until

15.

What will this code do?

a)

Print Numbers 1-11

b)

Print Numbers 1-10

c)

Print Numbers 2-10

d)

Print Error

16.

What will be the output of this code?

a)

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

b)

0,2,4,6,8,10

c)

2,4,6,8,10,12

d)

2,4,6,8,10

17.

Which of these will allow me to count from 0-20 in steps of 5?

a)

for x in range(0,20):

print(x)

b)

while x = (0,20,5):

print(x)

c)

for x in range(0,21,5):

print(x)

d)

for x in range(0,21,5):

print(y)