Worksheets2.2.1 Programming Constructs
Total questions: 10
Worksheet time: 7mins
Execution of statements or functions one after another.
Sequence
Iteration
Selection
Branching
Used to repeat sections of code.
Sequence
Iteration
Selection
Branching
Used when code is executed based on a condition.
Tick all that apply.
Sequence
Iteration
Selection
Branching
Give an example of an instruction in LMC that implements selection.
(a)
Which type of iteration executes a fixed number of predetermined times.
(a)
Which type of iteration executes until something happens.
(a)
Which is the correct IF statement?
if ( i == a )
if ( i=0 )
if (i=a )
if ( ( i = a ) && ( i = 0 ) )
Which of the following does NOT implement iteration?
WHILE
FOR
REPEAT UNTIL
IF
What is the name of the table used to test the operation of an algorithm?
(a)
Which of the following does NOT implement selection?
CASE
IF
ELSEIF
WHILE
