Computer Science
Grade 1
20 min
If It Rains, Then...
Exploring the consequence of rain (using an umbrella).
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Identify the 'if' part (condition) in a simple rule.
Identify the 'then' part (action) in a simple rule.
Explain that a computer follows rules one step at a time.
Create their own simple 'If...Then...' rule for a daily activity.
Follow a two-part 'If...Then...' instruction to reach a correct outcome.
Predict the outcome of a simple 'If...Then...' scenario.
What do you do IF it starts to rain outside? 🌧️ You make a choice!
We are learning about 'If...Then...' rules. These are special rules that help us and computers make choices. They are like a secret code for decisions!
Real-World Applications
If the light is red 🚦, then the car stops.
If you are hungry 😋, then you eat a snack.
If a v...
2
Key Concepts & Vocabulary
TermDefinitionExample
Condition (The 'If' part)This is the question part. It asks 'if' something is true. 🤔IF it is raining. IF the cat is sleeping. IF the block is red.
Action (The 'Then' part)This is the doing part. It is what happens 'then'. 👍THEN get an umbrella. THEN be very quiet. THEN put it in the red box.
If...Then... RuleA full instruction that connects a condition to an action. 📜IF you are sleepy, THEN you take a nap. 😴
DecisionMaking a choice based on a rule. You decide what to do. 🧠You see rain. You decide to get your coat because of the rule.
TrueWhen the 'if' part is happening right now. It is a 'yes'! ✅Is it raining? Yes! So, the condition is true.
FalseWhen the 'if' part is not happening. It is a...
3
Core Syntax & Patterns
The If...Then... Pattern
IF [a condition is true], THEN [do an action].
Use this to tell a computer (or a friend!) what to do when something specific happens.
Check First Rule
Always check the IF part before you do the THEN part.
You must look and see if the condition is true before you can do the action.
4 more steps in this tutorial
Sign up free to access the complete tutorial with worked examples and practice.
Sign Up Free to ContinueSample Practice Questions
Challenging
A game has this rule: 'IF you have the red key AND the red door is locked, THEN the door opens.' You have the red key, but you are at the blue door. What happens?
A.The blue door opens
B.Nothing happens
C.You lose the red key
D.The red door opens
Challenging
A robot chef follows this rule: 'IF the recipe says 'add salt' OR the recipe says 'add pepper', THEN the robot will shake the shaker.' The recipe says 'add flour'. What will the robot do?
A.Nothing, it will not shake the shaker
B.It will shake the shaker
C.It will get the salt
D.It will get the pepper
Challenging
Here are two rules: 1. 'IF it is Saturday, THEN you can go to the park.' 2. 'IF you go to the park, THEN you must wear shoes.' It is Saturday. What must be true before you can be at the park?
A.It must be sunny
B.You must ask a friend to come
C.You must be wearing shoes
D.You must bring a toy
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free