Programming Techniques (OCR A-Level 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

13 cards from this deck

Show

What are the 3 fundamental programming constructs?

Sequence, iteration, and branching

What is sequence?

Instructions executed one after another in order

What is iteration?

Repeating instructions until a condition is met

While loop characteristic

Repeats as long as a condition is true

For loop characteristic

Repeats a specific number of times

Repeat-until loop characteristic

Executes at least once, repeats until condition met

What is branching?

Allows program to make decisions based on conditions

IF statement function

Executes code block if condition is true

IF-ELSE statement function

Provides alternative action if condition is false

IF-ELSEIF-ELSE ladder function

Allows checking multiple conditions

CASE/SWITCH statement function

Matches a value to predefined cases

What causes infinite loops?

Failing to update conditions in loops

Benefit of iteration

Automates repetitive tasks, reducing redundancy

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Quizzes by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Flashcards with us.

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