Font size
WorksheetsN4 Code Constructs
Total questions: 13
Worksheet time: 8mins
What is a variable?
Statement with condition
Data item which stores value in program's memory
One of the data type
Code construct
Which statement is false?
Boolean is a data type with two values only TRUE or FALSE
A String data type holds text within " "
The integer is a whole negative or positive number
Real is a single character data type
The conditional statement is a statement with the condition to be either TRUE or FALSE.
TRUE
FALSE
The block of code for which condition is FALSE is executed after which word?
If
Else
string
end
The "if statement" with one or more "if statement" inside
is called what kind of "if statement"?
(a)
Within the "if statement", only one of the two blocks will be executed by the program.
TRUE
FALSE
The set of instructions to perform a specific task is called an algorithm.
TRUE
FALSE
A code construct that is executed line by line in the correct order is called:
Algorithm
Sequence
If Statement
Variable
Methods and Functions are:
procedures to perform a specific task or action
ways to add features to the program
instructions for program to follow
similar, but function will always return something
Loop constructs are blocks of code which:
repeat the code inside the block
give program two options
set up more than one condition
give program instructions to follow
Fixed Loop will repeat specific block of code - how many times?
Until condition is TRUE
Until condition is FALSE
Declared amount of times
It will generate error
Conditional Loop will repeat block of code - how many times?
Until condition is TRUE
Until condition is FALSE
Until condition is met
It will generate error
Using Loop Constructs instead of IF statements save time and reduces the size of code inside the program.
TRUE
FALSE
