Computer Science Grade 1 20 min

If It's Sunny, Then...

Exploring the consequence of sunshine (wearing sunglasses).

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Identify the 'if' part of a rule. Identify the 'then' part of a rule. Explain that the 'if' part must be true for the 'then' part to happen. Follow a simple one-step If-Then instruction. Create their own simple If-Then rule using familiar objects. Determine if a simple condition is true or false. What do you do IF it is raining outside? ๐ŸŒง๏ธ Let's learn about rules! We will learn about special rules called If-Then rules. These rules help computers and people make choices. They are like a secret code for decisions! Real-World Applications If the traffic light is red, then we stop the car. ๐Ÿšฆ If I am hungry, then I eat a yummy snack. ๐ŸŽ If my hands are dirty, then I wash them with soap.๐Ÿงผ If it is bedtim...
2

Key Concepts & Vocabulary

TermDefinitionExample If-Then RuleA special instruction with two parts. It tells us what to do if something is true.IF it is sunny, THEN we can play outside. โ˜€๏ธ Condition (The 'If' Part)This is the part we check first. It's a question that can be true or false.In our rule, 'IF it is sunny' is the condition. Is it sunny? Yes or no? Action (The 'Then' Part)This is the part we do. It only happens if the 'if' part is true.In our rule, 'THEN we can play outside' is the action. It's what we get to do! ๐Ÿคธ TrueTrue means yes! The condition is happening right now.If you look outside and the sun is shining, the condition 'it is sunny' is true. โœ… FalseFalse means no. The condition is not happening right now.If you look outside an...
3

Core Syntax & Patterns

The If-Then Pattern IF [a condition is true], THEN [do an action]. This is the pattern for all our rules. First comes the 'if', then comes the 'then'. The Check First Rule Always check the IF part before you do the THEN part. You can't do the action until you know if the condition is true. Look before you leap!

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
A game character's rule is: IF an enemy is near, THEN hide. The character sees an enemy but runs towards it instead. What is the best way to describe this?
A.The character is being brave
B.The character is following the rule
C.The character has a bug (it's not working right)
D.The enemy is friendly
Challenging
A robot vacuum cleaner keeps bumping into walls. You need to give it a rule to stop this. What is the BEST rule to add?
A.IF the robot is moving, THEN stop.
B.IF the robot gets near a wall, THEN turn.
C.IF the floor is clean, THEN stop.
D.IF the robot is on, THEN turn off.
Challenging
A toy machine's rule is: IF you put in a coin AND press the red button, THEN you get a prize. You put in a coin and press the BLUE button. What happens?
A.Nothing happens (or you get the coin back)
B.You get a prize
C.The machine breaks
D.You get two prizes

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 If...Then...: Simple Conditional Statements

Ready to find your learning gaps?

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