wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

N4 Code Constructs

Total questions: 13

Worksheet time: 8mins

Name
Class
Date
1.

What is a variable?

a)

Statement with condition

b)

Data item which stores value in program's memory

c)

One of the data type

d)

Code construct

2.

Which statement is false?

a)

Boolean is a data type with two values only TRUE or FALSE

b)

A String data type holds text within " "

c)

The integer is a whole negative or positive number

d)

Real is a single character data type

3.

The conditional statement is a statement with the condition to be either TRUE or FALSE.

a)

TRUE

b)

FALSE

4.

The block of code for which condition is FALSE is executed after which word?

a)

If

b)

Else

c)

string

d)

end

5.

The "if statement" with one or more "if statement" inside

is called what kind of "if statement"?

(a)  

6.

Within the "if statement", only one of the two blocks will be executed by the program.

a)

TRUE

b)

FALSE

7.

The set of instructions to perform a specific task is called an algorithm.

a)

TRUE

b)

FALSE

8.

A code construct that is executed line by line in the correct order is called:

a)

Algorithm

b)

Sequence

c)

If Statement

d)

Variable

9.

Methods and Functions are:

a)

procedures to perform a specific task or action

b)

ways to add features to the program

c)

instructions for program to follow

d)

similar, but function will always return something

10.

Loop constructs are blocks of code which:

a)

repeat the code inside the block

b)

give program two options

c)

set up more than one condition

d)

give program instructions to follow

11.

Fixed Loop will repeat specific block of code - how many times?

a)

Until condition is TRUE

b)

Until condition is FALSE

c)

Declared amount of times

d)

It will generate error

12.

Conditional Loop will repeat block of code - how many times?

a)

Until condition is TRUE

b)

Until condition is FALSE

c)

Until condition is met

d)

It will generate error

13.

Using Loop Constructs instead of IF statements save time and reduces the size of code inside the program.

a)

TRUE

b)

FALSE