Programming Constructs (OCR GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
12 cards from this deck
ShowHide
Practise the cards
12 cards from this deck
Programming constructs
Programming constructs
Fundamental building blocks that control program flow
Three basic programming constructs
Three basic programming constructs
Sequence, selection, iteration
Sequence construct definition
Sequence construct definition
Execution of instructions in exact order they are written
How often sequence executes each instruction
How often sequence executes each instruction
Exactly once, in the right order
Selection construct definition
Selection construct definition
Choosing different paths of execution based on a condition
Keywords used for selection in Python
Keywords used for selection in Python
if, elif, else
Iteration construct definition
Iteration construct definition
Repeating a block of code multiple times
Two main types of iteration loops
Two main types of iteration loops
Count-controlled and condition-controlled
Count-controlled loop definition
Count-controlled loop definition
Loop that repeats a specific number of times
Loop type for count-controlled iteration
Loop type for count-controlled iteration
for loop
Condition-controlled loop definition
Condition-controlled loop definition
Loop that repeats as long as a condition remains true
Loop type for condition-controlled iteration
Loop type for condition-controlled iteration
while loop
