Thinking Logically (OCR A-Level Computer Science): Flashcards

📚Flashcards
Decisions in Computational Thinking
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

What is a decision in a program?

Point where next action depends on whether a condition is true or false

What is the purpose of decisions in programs?

Control program flow by choosing between different paths

What do IF statements do?

Execute a block of code if a condition is true

What does an IF-ELSE-IF ladder handle?

Multiple conditions

When to use CASE/SWITCH statements?

When checking multiple conditions against a single variable

How do decisions create branching?

Create multiple paths leading to different outcomes based on conditions

How do decisions affect loops?

Determine how many times the loop executes

What is the flowchart symbol for decision points?

Diamond shape

What error results from misplacing decision points?

Leads to incorrect outcomes

What is the risk of ignoring edge cases?

Failing to account for all possible conditions or inputs

What problem comes from overcomplicating decision logic?

Too many nested IFs make program harder to understand and debug

What is the risk of missing DEFAULT in CASE statements?

Can lead to unhandled scenarios

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

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