0
0
Intro to Computingfundamentals~10 mins

Conditional logic (if-then decisions) in Intro to Computing - Flowchart & Logic Diagram

Choose your learning style9 modes available
Process Overview

Conditional logic helps a computer decide what to do next by checking if something is true or false. It’s like making a choice based on a question.

Flowchart
Check condition
Do action
This flowchart shows a simple if-then decision: the computer checks a condition, then does one action if true, or another if false, then ends.
Step-by-Step Trace - 5 Steps
Step 1: Start the decision process
Step 2: Check if the condition is true
Step 3: If condition is true, do the first action
Step 4: If condition is false, do the other action
Step 5: End the decision process
Diagram
Check condition
Take umbrella
This diagram shows a real-life example of conditional logic: if it is raining, take an umbrella; if not, wear sunglasses.
Flowchart Quiz - 3 Questions
Test your understanding
What happens if the condition is true?
AThe computer skips the action
BThe computer does the other action
CThe computer does the first action
DThe computer ends immediately
Key Result
Conditional logic lets computers choose between two actions based on a true or false question.