LESSON PLAN 59: Practical Application—Traffic Control Program

UNIVERSAL PICTURE cbe

LESSON PLAN 59: Practical Application—Traffic Control Program

Lesson Details

Strand: 3.0 Software Development
Sub Strand: 3.3 Identifiers and Operators
Duration: 40 minutes (Single lesson)
Lesson: 6 of 6
Class Level: Grade 10

Key Inquiry Question (Lesson Starter)

How can programming solve real-world problems like traffic control?

Specific Learning Outcomes

By the end of the lesson, the learner should be able to:

  • a) write and execute a program on traffic control that accepts input and displays output,
  • b) apply identifiers and operators in solving real-world problems,
  • c) develop print or digital content to educate peers on the role of identifiers and operators in programming,
  • d) demonstrate responsibility and creativity in programming,
  • e) appreciate the role of programming in solving societal problems.

Selected Learning Experiences

Introduction (5 minutes)

  • Review homework: Quick check of precedence problems and programs (restaurant bill, circle area, average calculator)
  • Present key inquiry question: “How can programming solve real-world problems like traffic control?”
  • Real-world discussion: “What happens at traffic lights? How do they decide when to change?”
  • Show image/video of traffic light system (if available via projector)
  • Brainstorm: What factors might affect traffic light decisions?
    • Number of vehicles waiting
    • Time of day (rush hour vs quiet time)
    • Emergency vehicles present
    • Pedestrian crossings
  • Brief sharing: “Has anyone been stuck in traffic? What would help?”
  • Introduce lesson focus: Creating a program that makes traffic control decisions using everything we’ve learned

Development Activities (30 minutes)

Activity 1: Analysing the Traffic Control Problem (8 minutes)

  • Write and execute a program on traffic control that accept input and display output
  • Teacher projects traffic control scenario on screen or writes on whiteboard
  • Class discusses requirements together

Problem Scenario: “Design a simple traffic control system that decides how long a green light should stay on based on the number of vehicles waiting.”

Analysis Questions (Teacher asks, students respond, write answers on board):

  1. What information (input) does the system need?
    • Number of vehicles waiting (integer)
    • Time of day – optional (string or integer)
    • Emergency vehicle present? (boolean/string)
  2. What decisions must the system make?
    • Calculate appropriate green light duration
    • Decide if emergency override needed
    • Determine if traffic is heavy or light
  3. What should the system display (output)?
    • Current light colour
    • Duration green light will stay on
    • Traffic status (light/medium/heavy)
    • Any special alerts (emergency)
  4. What identifiers (variables) do we require? Write on board:

python

  vehicle_count     # integer – number of vehicles

   light_duration    # integer – seconds for green light

   emergency_present # string – “yes” or “no”

   traffic_status    # string – description

   light_color       # string – “GREEN”

“`

5. **What operators will we use?**

   – **Arithmetic:** calculate duration (*, +, -)

   – **Relational:** check conditions (>, <=, ==, >=)

   – **Logical:** combine conditions (and, or)

   – **Assignment:** store values (=, +=)

**Simple Logic Example on Whiteboard:**

“`

Upgrade or Subscribe

Oops! Unlock More Access Rights:

If you find that you are not subscribed, consider upgrading your account or subscribing to the necessary plan to gain access.


Discover more from ELIMU ASSISTANT

Subscribe to get the latest posts sent to your email.

Elimu Assistant Team

By Elimu Assistant Team

Get in Touch! Need educational resources? Reach out! I'm here to help. Name: Mr. Atika Email: nyamotima@yahoo.com Phone: 0728450425 (Safaricom) | 0738619279 (Airtel)

Leave a Reply

Discover more from ELIMU ASSISTANT

Subscribe now to keep reading and get access to the full archive.

Continue reading