wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Half term recap quiz

Total questions: 15

Worksheet time: 14mins

Name
Class
Date
1.

What is the 'input()' function used for in python?

a)

To output a message to the screen.

b)

To receive an input that the user types using a keyboard.

c)

To preform a calculation- like adding a number.

d)

To create a container which stores data.

2.

What is the "print()" function used for in python?

a)

To output a message to the screen.

b)

To receive an input that the user types using a keyboard.

c)

To print out a sheet of paper to the FAX machine.

d)

To find the answer to a mathematical calculation.

3.

What is 'syntax' in computing?

a)

A tax you have to pay for using the internet.

b)

A mathematical symbol such as + or =.

c)

Errors in code such as incorrect spelling or missing symbols.

d)

When a program is deleted.

4.

What character do we use to assign a value to a 'variable' (container)?

a)

!

b)

+

c)

=

d)

/

5.

What is the output of the program in the image? (click to enlarge)

a)

score

b)

Your score is score

c)

There is an error in the code.

d)

Your score is 20

6.

What will be the output of the print function in the image?

a)

Welcome Enter your name:

b)

Welcome name

c)

Welcome + whatever the user types for the input.

d)

There is an error in the code

7.

Identify the two errors in the code displayed in the image:

a)

They forgot to assign a value to the variable.

b)

'input' is spelled wrong.

c)

They didn't enter their name.

d)

There is a missing comma in the print function to separate the message from the variable.

8.

Identify the two errors in the code displayed in the image.

a)

There is no input from the user.

b)

There is a missing bracket on the end.

c)

The 'print()' function is spelled with an uppercase P here.

d)

There are too many speechmarks.

9.

Which of these statements is good advice if it is rainy outside?

a)

Don't wear a coat.

b)

Wear sunglasses.

c)

Get an umbrella.

d)

Roll around on the grass at breaktime.

10.

Which of these statement is good advice if it is sunny outside?

a)

Get some sunglasses

b)

Put on a warm, hooded coat.

c)

Don't wear sun cream.

d)

Spend all day inside playing fortnite.

11.

What will be the output of the program in the image if the user types in the word "Hi"?

a)

Nothing.

b)

HiHiHiHiHi

c)

There is an error inthe code.

d)

Hi

12.

True or False:

Is (2+2) equal to (2x2)?

a)

True

b)

False

13.

True or false:

Is (5 x 5) equal to 25?

a)

True

b)

False

14.

True or False:

Is (2 + 8) equal to (2 x 8)?

a)

True

b)

False

15.

What is a 'variable' in python?

a)

A way to add a larger variety of numbers to your program.

b)

A word that can be used to find the area of a square.

c)

A way to receive input from the user.

d)

A container which we can create to store data such as numbers inside.