Applying Conditional Logic for Decision Making in Automation
Objective
Learn how to combine loops + conditions to make smart decisions and automate daily tasks.
1. Recap
-
iflets the program choose between options. -
Loops (
for,while) let us repeat tasks. -
Together → we can build automated workflows (decisions inside repetition).
2. Example 1 – Filtering Emails
Imagine we get 5 emails in a day. We want to automatically separate important ones.
Output:
👉 Demo Tip: Ask students how they’d add “Exam Results” to the important category. Change condition and re-run.
3. Example 2 – Automating To-Do List Check
You have a daily task list. The program will mark tasks as Done or Pending.
Output:
4. Example 3 – Auto-Calculate Overtime Pay
Employees working more than 8 hours get overtime.
Output:
