wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

algorithms and programming

Total questions: 16

Worksheet time: 5mins

Name
Class
Date
1.

What are the three basic programming constructs?

a)

Sequence, selection and iteration

b)

Sequence, selection and looping

c)

Sequence, iteration and looping

d)

Sequence, execution and selection

2.

Which of the following statements implement definite iteration?

a)

​STOP UNTIL

b)

FOR ENDFOR

c)

REPEAT UNTIL

d)

WHILE ENDWHILE

3.

What are the two possible results of testing a condition?

a)

YES and NO​

b)

POSITIVE and NEGATIVE

c)

​TRUE and FALSE​

d)

0 or 1

4.

What is the name given to the joining of strings?​

a)

Manipulation

b)

Declaration

c)

addition

d)

Concatenation

5.

Which logical operator represents greater than?

a)

<

b)

>

c)

>=

d)

==

6.

Which of the following is a benefit of using local variables?

a)

Other programmers cannot use them

b)

They cannot accidentally be changed by other parts of a program

c)

They make all variable names unique

d)

They make selections work

7.

What is an array?

a)

A data structure that holds one or more items of data

b)

A variable with more than one data type

c)

A variable with more than one value

d)

Sorting data in a list 

8.

Which data type represents whole numbers?

a)

Real

b)

String

c)

Integer

d)

Float

9.

What is a constant?

a)

A value that does not usually change as a program is running

b)

A variable with more than one data type

c)

A named piece of memory that holds a value which usually changes as a program is running

d)

A named piece of memory that holds a value which cannot be changed as a program is running

10.

What is a function?

a)

A type of subroutine that calculates a value

b)

A type of subroutine that returns a value

c)

A type of subroutine that processes a value, but does not return it

d)

A type of subroutine that only runs when called 

11.

What is recorded in a test/trace table?

a)

Evidence of successful tests

b)

Evidence of failed tests

c)

Evidence of testing

d)

Evidence the program run

12.

What are two types of programming error?

a)

Syntax errors and logic errors

b)

Syntax errors and validation errors

c)

Logic errors and validation errors

d)

Error Erros 

13.

What is an algorithm?

a)

How to make a jam sandwich

b)

A way to solve a problem

c)

instructions

d)

Step by step instructions to solve a problem

14.

Code repeated / looped until a condition has been met or a set number of times.

a)

Iteration

b)

While...

c)

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never...

d)

For...

15.

people = ["jo", "maya", "jay"]​

print (people[1])​

what would this result be?

a)

maya

b)

jo

c)

jay

d)

error

16.

What is the % used for in Python?

a)

Integer division

b)

Give the whole number

c)

To give the remainder

d)

Give the decimal only