Programming Constructs (OCR GCSE Computer Science): Flashcards

📚Flashcards
Programming Constructs
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

12 cards from this deck

Show

Programming constructs

Fundamental building blocks that control program flow

Three basic programming constructs

Sequence, selection, iteration

Sequence construct definition

Execution of instructions in exact order they are written

How often sequence executes each instruction

Exactly once, in the right order

Selection construct definition

Choosing different paths of execution based on a condition

Keywords used for selection in Python

if, elif, else

Iteration construct definition

Repeating a block of code multiple times

Two main types of iteration loops

Count-controlled and condition-controlled

Count-controlled loop definition

Loop that repeats a specific number of times

Loop type for count-controlled iteration

for loop

Condition-controlled loop definition

Loop that repeats as long as a condition remains true

Loop type for condition-controlled iteration

while loop

Explore OCR GCSE Computer Science Revision Notes by Topics

Explore OCR GCSE Computer Science Model Answers by Topics

Explore OCR GCSE Computer Science Quizzes by Topics

Explore OCR GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.