wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Programming Basics

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Which of the following best defines the term Abstraction?

a)

A method of solving problems by removing unnecessary details.

b)

A method of solving problems by breaking them down into smaller parts.

c)

A method of planning a solution using recognised shapes, such as a diamond.

d)

A method of planning a solution using a recognised format; declare variables, inputs, process and outputs.

2.

Which of the following best defines the term Decomposition?

a)

A method of solving problems by removing unnecessary details.

b)

A method of solving problems by breaking them down into smaller parts.

c)

A method of planning a solution using recognised shapes, such as a diamond.

d)

A method of planning a solution using a recognised format; declare variables, inputs, process and outputs.

3.

Which of the following best defines the term pseudocode?

a)

A method of solving problems by removing unnecessary details.

b)

A method of solving problems by breaking them down into smaller parts.

c)

A method of planning a solution using recognised shapes, such as a diamond.

d)

A method of planning a solution using a recognised format; declare variables, inputs, process and outputs.

4.

Which of the following best defines the term flow diagram?

a)

A method of solving problems by removing unnecessary details.

b)

A method of solving problems by breaking them down into smaller parts.

c)

A method of planning a solution using recognised shapes, such as a diamond.

d)

A method of planning a solution using a recognised format; declare variables, inputs, process and outputs.

5.

What does the term "Algorithmic Thinking" mean?

a)

Applying logic to solve a problem. This could be presented as either a flow diagram or pseudocode.

b)

Writing the different steps to solve a problem. This could be either on paper or in a program.

c)

Using an if statement to determine what happens next within a program.

d)

Using either a for loop or a while loop to repeat a section of code within a program.

6.

What does the term "Sequence" mean?

a)

Applying logic to solve a problem. This could be presented as either a flow diagram or pseudocode.

b)

Writing the different steps to solve a problem. This could be either on paper or in a program.

c)

Using an if statement to determine what happens next within a program.

d)

Using either a for loop or a while loop to repeat a section of code within a program.

7.

What does the term "Selection" mean?

a)

Applying logic to solve a problem. This could be presented as either a flow diagram or pseudocode.

b)

Writing the different steps to solve a problem. This could be either on paper or in a program.

c)

Using an if statement to determine what happens next within a program.

d)

Using either a for loop or a while loop to repeat a section of code within a program.

8.

What does the term "Iteration" mean?

a)

Applying logic to solve a problem. This could be presented as either a flow diagram or pseudocode.

b)

Writing the different steps to solve a problem. This could be either on paper or in a program.

c)

Using an if statement to determine what happens next within a program.

d)

Using either a for loop or a while loop to repeat a section of code within a program.

9.

Which of the following is NOT a data type?

a)

alphanumeric

b)

string

c)

integer

d)

float

10.

Which of the following is the correct data type for a whole number?

a)

character (char)

b)

string

c)

integer (int)

d)

float

11.

Which of the following is the correct data type for a decimal number?

a)

character (char)

b)

string

c)

integer (int)

d)

float

12.

Which of the following is the correct data type for a single character?

a)

character (char)

b)

string

c)

integer (int)

d)

float

13.

What does BOOLEAN mean?

a)

It is a True/False data type.

b)

It is an alphanumeric data type.

c)

It is an example of iteration.

d)

It is an example of sequence.

14.

What is the best data type for a variable "Telephone Number"

a)

string

b)

character

c)

integer

d)

float

15.

What is the best data type for a variable "StudentName"

a)

string

b)

character

c)

integer

d)

float

16.

What is a variable?

a)

A fixed value within a program, such as VATrate.

b)

A named memory location that can change throughout a program, such as TotalPrice.

c)

A variable that can be called at any time within a program.

d)

A variable that can only be called within a loop or sub-program.

17.

What is a constant?

a)

A fixed value within a program, such as VATrate.

b)

A named memory location that can change throughout a program, such as TotalPrice.

c)

A variable that can be called at any time within a program.

d)

A variable that can only be called within a loop or sub-program.

18.

Which of the following is NOT an arithmetic operation?

a)

+

b)

/

c)

<=

d)

*

19.

Which of the following is NOT a comparison (logical) operation?

a)

>

b)

/

c)

<=

d)

==

20.

What is the purpose of DIV?

a)

Integer division

b)

Multiplication

c)

Modulus

d)

Exponentiation

21.

What is the purpose of MOD?

a)

Integer division

b)

Multiplication

c)

Modulus

d)

Exponentiation

22.

What is the purpose of ^ (or **)?

a)

Integer division

b)

Multiplication

c)

Modulus

d)

Exponentiation

23.

What is the output of this flow diagram if the input is 11?

a)

11

b)

15

c)

High Number

d)

Low Number

24.

What is the output of this flow diagram if the input is 22?

a)

22

b)

15

c)

High Number

d)

Low Number

25.

What is the output of the following pseudocode when the input is 3?


declare variables: number = int (0)

cube = int (0)

Input: number ("Please input a number: ")

Process: cube = number^3

Output: print (cube)

a)

0

b)

3

c)

9

d)

27