wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is iteration?

a)

A process wherein a set of instructions or structures are repeated once.

b)

A process wherein a set of instructions or structures are not repeated in a sequence a specified number of times or until a condition is met

c)

A process wherein a set of instructions or structures are repeated in a sequence a specified number of times or until a condition is met.

d)

A process wherein a set of instructions or structures are repeated in a sequence a random number of times or until a condition is met

2.

An If Statement is used in?

a)

Iteration

b)

Selection

c)

Sequence

3.

What value does a String return?

a)

1.29

b)

H

c)

8

d)

Ten

4.

What value will a float return?

a)

True

b)

14

c)

seven

d)

2.92

5.

What value will Boolean return?

a)

14

b)

Fish and chips

c)

T

d)

True

6.

What will the following code output if four different students scored: 60, 57,61,79?


IF average ≥ 80 THEN​

OUTPUT “Distinction”​

ELSE IF average ≥ 60 THEN​

OUTPUT ”Merit”​

ELSE IF average ≥ 40 THEN​

OUTPUT “Pass”​

ELSE​

OUTPUT “Fail”​

ENDIF​

a)

Merit, Merit, Merit Merit

b)

Pass, Merit, Merit Pass

c)

Merit, Pass, Merit, Merit

d)

Merit, Pass, Merit, Distinction

7.

According to the code below. What is the price for an adult on Saturday? ​


IF member = “child” THEN​

IF day = “Saturday” THEN​

swimPrice  2.00​

ELSE​

swimPrice  2.50​

ENDIF​

ELSE ​

swimPrice  4.00​

ENDIF ​

a)

2.50

b)

2.00

c)

6.00

d)

4.00

8.

According to the code below. What is the price for a child to swim on Monday?


IF member = “child” THEN​

IF day = “Saturday” THEN​

swimPrice  2.00​

ELSE​

swimPrice  2.50​

ENDIF​

ELSE ​

swimPrice  4.00​

ENDIF ​

a)

4.00

b)

2.00

c)

2.10

d)

2.50

9.

What is a Variable?

a)

A data values that can change when the user is asked a question, for example, their age

b)

A data values that can only change once

c)

A data values that cannot change when the user is asked a question, for example, their age

d)

A data values that can change automatically

10.

What is an Array?

a)

A data structure that does not allow you to hold several values with one name.

b)

An impressive range of lights.

c)

A data structure that allows you to hold several values, all of the same type, with one name.

d)

A data structure that allows you to hold several values, all of the same type, with one name.

11.

What is Pseudocode?

a)

A programming language.

b)

Executable code

c)

A notation resembling a simplified programming language, used in program design

d)

A type of diagram that represents a workflow or process

12.

What is a subroutine?

a)

A sequence of actions regularly followed.

b)

Low level instructions

c)

A set of instructions designed to perform a frequently used operation within a program.

d)

A set of instructions

13.

Which of these can be used as data validation checks?

a)

Range check

b)

Rope check

c)

Presence check

d)

Length check

14.

Which of the following relates to a Presence check?

a)

Data is of the right type, such as integer, letter or text

b)

Checks that the format of, for example, a postcode or email address is correct

c)

Checks that data has been entered, i.e. the field has not been left blank​

d)

Text entered is not too long or too short – for example, a password is between 8 and 15 characters

15.

What is a trace table?

a)

A table used to record the scores of a computer football game

b)

A transparent table

c)

A table useful for tracing through a program in order to find a logic error ​

d)

A table that hold all variables within code