Week 9 Lesson 1 Challenge
YEAR 9 DIGITAL TECHNOLOGIES • IMPORTS CHALLENGE
Airport Security Challenge
In this challenge, you will use imports to build a simple airport security system.
✈️ SCENARIO
Imagine you are writing a Python program for an airport security gate.
The airport security system must decide whether a passenger:
- is blocked because the airport is closed
- is sent to extra screening
- or is allowed through
To do that, the program will use two imports: datetime and random.
🎯 YOUR GOAL
Build a program that follows these rules:
- Check the current hour.
- If the airport is closed, stop there.
- If the airport is open, generate a random number.
- If that number divides exactly by 7, send the passenger to extra screening.
- Otherwise, allow the passenger through.
💭 WHAT YOU SHOULD THINK ABOUT
- What does an import do?
- How do you get the current hour from Python?
- How do you generate a random number?
- Which check should happen first?
- How will your program decide whether the passenger is blocked, screened, or allowed?
- What messages should the program print so the user understands what happened?
📌 SUCCESS CRITERIA
- Your program uses at least one import.
- Your program checks whether the airport is open.
- Your program generates a random number only when needed.
- Your program checks whether the number works exactly with 7.
- Your output is clear and readable.
- Your code is organised enough that you could explain it out loud.
💬 WHAT TO POST IN REPLY BELOW
- Your code attached as a .py file
✅ REMEMBER
You do not need to get it perfect on the first go.
The goal is to think, test, improve, and explain your logic.