top of page
Inaugurated by IN-SPACe
ISRO Registered Space Tutor

S0-SA3-0257

What is If-Then (simple)?

Grade Level:

Class 2

Logic, Computing, AI, Law, Science

Definition
What is it?

If-Then (simple) is a basic rule that helps us make decisions. It means if a certain condition is true, then a specific action will happen. It's like a instruction that tells a computer, or even you, what to do next.

Simple Example
Quick Example

Imagine you are watching a cricket match. If your favourite team scores a boundary (a 4 or a 6), then you clap loudly. Here, 'your team scores a boundary' is the 'If' condition, and 'you clap loudly' is the 'Then' action.

Worked Example
Step-by-Step

Let's say you want to buy a samosa from the school canteen.

Step 1: Identify the condition. The condition is: 'If I have enough money for a samosa (say, Rs. 10)'.
---Step 2: Identify the action. The action is: 'Then I will buy a samosa'.
---Step 3: Check the condition. You check your pocket and find you have Rs. 15.
---Step 4: Since Rs. 15 is more than Rs. 10, the condition 'I have enough money' is true.
---Step 5: Perform the action. You go ahead and buy the samosa.

Answer: You buy the samosa because the 'If' condition was met.

Why It Matters

If-Then logic is fundamental to how computers think and how Artificial Intelligence works. It's used in building apps, making robots move, and even predicting weather. Understanding this helps you think logically, which is useful in science, law, and even for careers as a software engineer or data scientist.

Common Mistakes

MISTAKE: Thinking the 'Then' action happens even if the 'If' condition is false. | CORRECTION: The 'Then' action only happens IF the 'If' condition is true. If the condition is false, the action does not happen.

MISTAKE: Confusing the condition with the action. | CORRECTION: The 'If' part describes a situation or requirement, while the 'Then' part describes what will be done as a result.

MISTAKE: Assuming there is always an alternative action if the 'If' condition is false. | CORRECTION: For simple If-Then, if the condition is false, nothing happens. There isn't an 'else' part (that comes in If-Then-Else).

Practice Questions
Try It Yourself

QUESTION: If it rains today, then I will carry my umbrella. It is raining. What will I do? | ANSWER: I will carry my umbrella.

QUESTION: My mom said: 'If you finish your homework, then you can watch TV for 30 minutes.' You finished 3 out of 5 subjects of homework. Can you watch TV? | ANSWER: No, because you did not finish ALL your homework, so the 'If' condition is not fully met.

QUESTION: A traffic light rule is: 'If the light is red, then stop your vehicle.' You are driving and see a green light. What should you do? | ANSWER: You should continue driving (or proceed carefully). The 'If' condition (red light) is false, so the 'Then' action (stop) does not apply.

MCQ
Quick Quiz

Which of these is an example of a simple If-Then statement?

I will eat lunch.

If I am hungry, then I will eat lunch.

Eat lunch and then play.

I like to eat lunch.

The Correct Answer Is:

B

Option B clearly states a condition ('If I am hungry') and a resulting action ('then I will eat lunch'). The other options are just statements or commands, not conditional rules.

Real World Connection
In the Real World

Many apps on your phone use If-Then logic. For example, in a food delivery app like Zomato or Swiggy, 'If the restaurant is open, then you can place an order.' Or in a banking app, 'If your PIN is correct, then you can access your account.' These simple rules make complex systems work.

Key Vocabulary
Key Terms

CONDITION: A situation or requirement that must be true for an action to happen. | ACTION: The specific task or event that happens if the condition is met. | LOGIC: The process of reasoning and making decisions based on rules. | STATEMENT: A sentence that can be true or false.

What's Next
What to Learn Next

Great job understanding If-Then! Next, you can explore 'If-Then-Else'. This builds on what you learned by adding an alternative action for when the 'If' condition is not true, making decision-making even more powerful!

bottom of page