1/9
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a programming construct?
A programming construct determines the order in which lines of code are executed and controls the logic and behaviour of code.
The three core programming constructs are?
The three core programming constructs are sequence, selection, and iteration.
Define sequence.
Sequence refers to lines of code which are run one line at a time in the order they are written from first to last.
What is selection?
Selection is when the flow of a program is changed depending on a set of conditions, determining which lines or block of code runs next.
Two ways to write selection statements are?
Two ways to write selection statements are: if…then…else statements and case/switch statements.
Define iteration.
Iteration is repeating a line or block of code using a loop.
State two types of Iteration.
Iteration can be count controlled (e.g. for loop) or condition controlled (e.g. while loop).
The keywords indicating selection are?
The keywords indicating selection are if, elseif, else, endif, switch, case.
The keywords indicating iteration are?
The keywords indicating iteration are for, while, do.
If no selection or iteration keywords, the construct is?
If no selection or iteration keywords are present, the construct is sequence.