Programming concept activities

Table of contents

Quick brainstorm

If statements and for loops activity

Rewrite a workflow in if and for terms

Quick brainstorm

Think of a process you handle repeatedly, like reviewing support tickets or following up on overdue payments. Write down a condition you would check (e.g., "Is the ticket marked urgent?") and a list you might go through (e.g., "List of open tickets"). This will help you see where if statements and for loops could simplify your work through automation.

If statements and for loops activity

Real-life scenarios: If statement or for loop?

Consider the following scenarios and determine if each would require “if statement” or “for loop” logic.

Checking if your phone has any notifications before opening apps

If statement

Brushing each tooth in your mouth

For loop

Deciding whether to wear a coat based on the temperature

If statement

Handing out nametags to each student in a classroom

For loop

Checking that a store is open before going inside

If statement


MSP & IT automation scenarios: If statement or for loop?

Now let’s try real tech and automation examples that a you might encounter.

A monitoring tool checks that a server is online before running updates

If statement

A script applies a software patch to every workstation in a company

For loop

A system scans each open to ticket to see if it's marked "urgent"

If statement

A workflow sends an alert only when a backup fails

If statement

A report gathers usage data for every customer in your system

For loop

Rewrite a workflow in if and for terms

Take a real-world IT process and break it into "if" statements and "for" loops. Here’s an example:

Scenario: Password expiration checks

A company requires all employees to update their passwords every 90 days.

Logic as an automation rule:

  • For each employee in the company:

    • If their password is older than 90 days, send a reminder email.

Your turn

Think of a simple MSP-related automation you’ve seen or heard of.

  • How would you describe it using IF statements and FOR loops?

Recap: What did we learn?

  • IF statements check conditions and make decisions.

  • FOR loops repeat tasks across multiple items.

  • Both are crucial for IT automation, especially in MSP workflows.

Last updated

Was this helpful?