Computer Science Grade 1 20 min

If-Then Statements: Making Choices

Introduction to the concept of 'if-then' statements (e.g., If it is raining, then we will stay inside).

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Identify the 'if' part (the question) in a simple rule. Identify the 'then' part (the action) in a simple rule. Explain that the 'then' action only happens if the 'if' part is true. Create a simple if-then rule for a daily activity, like getting dressed. Follow a two-step if-then instruction from a teacher or a game. Use the words 'if' and 'then' to describe a choice they made. Have you ever had to make a choice? 🤔 Like, if it's cold, what do you wear? 🧥 We are going to learn about special rules called If-Then rules. These rules help computers, and us, make smart choices! It's like being a detective for decisions. 🕵️ Real-World Applications If the traffic light is red 🚦, then we...
2

Key Concepts & Vocabulary

TermDefinitionExample If-Then RuleA special rule that helps us make a choice.If it is raining 🌧️, then I will take my umbrella ☂️. ChoicePicking what to do from different options.Choosing to wear a coat or a t-shirt. If (The Question Part 🤔)This part asks a question to check if something is true.In our rule, 'If it is raining' is the question part. Then (The Action Part ✅)This part tells us what action to do if the 'if' part is true.In our rule, 'then I will take my umbrella' is the action part. True (Yes 👍)This means the 'if' question is a 'yes'.It IS raining outside, so the 'if' part is true. False (No 👎)This means the 'if' question is a 'no'.It is sunny ☀️, so 'if it is raining' is false.
3

Core Syntax & Patterns

The If-Then Pattern If [a question], then [an action]. All of our choice rules follow this pattern. First comes the question, then comes the action. The 'Yes' Gate Only do the 'then' action if the 'if' question is YES! ✅ If the 'if' question is a 'no', you don't do the action. You just skip it.

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
You want to make sure your plant gets enough light. Which "If-Then" rule is best for your plant?
A.If it is nighttime, then put the plant in the sun.
B.If the plant looks sad, then hide it in a closet.
C.If the sun is shining, then put the plant by the window.
D.If it is raining, then give the plant ice cream.
Challenging
The computer's rule is: "If the animal has wings, then it can fly." The computer shows a picture of a penguin 🐧 and says it can fly. Why is the computer wrong?
A.The rule is wrong because some animals with wings, like penguins, can't fly.
B.The computer is right.
C.Penguins don't have wings.
D.All animals can fly.
Challenging
You want to build the tallest tower. Which rule is the best to follow?
A.If a block is wobbly, then put it on top.
B.If a block is big and flat, then put it on the bottom.
C.If a block is small, then put it on the bottom.
D.If a block is your favorite color, then put it on top.

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Logical Reasoning: Thinking Like a Computer

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.