wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Assessment

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which PYTHON command is missing from the brackets?

a)

Count

b)

Print

c)

While

d)

10

2.

What symbol is used for multiplication in Python coding?

a)

x

b)

+

c)

#

d)

*

3.

When coding in Python what two instructions would I use if I want the program to select a choice?

a)

IF

PRINT

b)

IF

COUNT

c)

IF

ELSE

d)

IF

INPUT

4.

In Python coding what does the instruction PRINT do?

a)

Instruct a printer to work

b)

Add together two numbers

c)

Print a statement on the screen

d)

Input a number

5.

What is missing from the Python code in the image?

a)

() [brackets]

b)

" " [speech marks]

c)

: [colon]

d)

; [semi-colon]

6.

What word is missing from the Python code in the image?

a)

print

b)

birth_year

c)

age

d)

input

7.

Why is there an error in Line 1 of the code?

a)

No brackets

b)

No speech marks

c)

print should be changed to input

d)

Brackets should be square

8.

Why is there an error in line 6 of this Python code?

a)

No speech marks

b)

No brackets

c)

No full stop

d)

No comma

9.

The image contains a program in Python to roll three dice together - what numbers are missing from the bracket?

a)

1 and 18

b)

2 and 18

c)

3 and 18

d)

4 and 18

10.

What command is missing on Line 31?

a)

ELIF

b)

ELSE

c)

PRINT

d)

COUNT

11.

What is the missing instruction?

a)

Print

b)

print

c)

(print)

d)

"Print"

12.

What word explains a set of instructions created to complete a particular task

a)

Sequence

b)

Selection

c)

Iteration

d)

Variable

13.

What word describes an instruction that repeats itself in a loop?

a)

Sequence

b)

Selection

c)

Iteration

d)

Variable

14.

What word describes a part of a program that makes a choice between one option or another

a)

Sequence

b)

Selection

c)

Iteration

d)

Variable

15.

What word describes a part of a program that stores information that may change later on

a)

Selection

b)

Sequence

c)

Iteration

d)

Variable

16.

What is the code missing from the line at the top?

a)

while

b)

while true

c)

while True

d)

while True:

17.

What is the name of the graphics package on Python?

a)

Tortoise

b)

Turtle

c)

Terrapin

d)

Turkey

18.

Dinsdale wants to add a second light to his code. After copying lines 8 to 13, what two pieces of code would he have to change in lines 15-20 to place the light in a new position and with a different colour?

a)

Every redlight and redlight.goto(40, 40)

b)

red light in line 8 and redlight.goto(40,40)

c)

red light in line 8 and redlight.penup()

d)

Every redlight and redlight.penup()

19.

What does placing a hashtag at the beginning of a line do to your code?

a)

Put it in the correct order

b)

Highlight a mistake

c)

Ignore what is written after it

d)

Multiply any numbers

20.

Which line of code would be used to change a background colour in Python?

a)

wn.bgcolour("blue")

b)

wn.bgcolor = blue

c)

wn.bgcolour = blue

d)

wn.bgcolor("blue")