Day 5 - Program Inputs and Outputs
Day 5: Program Inputs and Outputs
Learning Objectives
- CRD-2.C: Identify input(s) to a program.
- CRD-2.D: Identify output(s) produced by a program.
Essential Questions
- How do programs use inputs to produce outputs?
- How does event-driven programming respond to user actions?
Materials Needed
- Presentation slides on program inputs and outputs
- Computers with programming environment
- Sample programs demonstrating various inputs/outputs
- Lab worksheet for input/output identification
- Mini-project design template
Vocabulary
- Input
- Output
- Event
- Event handler
- Event-driven programming
- User interface
Procedure (50 minutes)
Opening (8 minutes)
-
Review and Connection (3 minutes)
- Review program purpose and function from previous lesson
- Connect to today's focus on inputs and outputs
-
Warm-up Activity (5 minutes)
- Students list inputs and outputs for familiar programs/apps
- Share and discuss examples as a class
Main Activities (32 minutes)
-
Lecture: Types of Program Inputs and Outputs (10 minutes)
- Define and categorize program inputs:
- User inputs (keyboard, mouse, touch, voice)
- File inputs
- Network/API inputs
- Sensor inputs
- Define and categorize program outputs:
- Visual outputs (text, graphics)
- Audio outputs
- File outputs
- Network outputs
- Control signals to other systems
- Define and categorize program inputs:
-
Demo: Event-Driven Programming Examples (7 minutes)
- Demonstrate how events trigger program responses
- Show examples of event handlers in code
- Explain the relationship between user actions, events, and program behavior
- Demonstrate how the same input can produce different outputs depending on program state
-
Lab: Identify Inputs and Outputs (10 minutes)
- Students work individually or in pairs
- Analyze several sample programs
- For each program, identify and document:
- All possible inputs
- All possible outputs
- The relationship between specific inputs and outputs
- Events that trigger program behavior
-
Mini-Project Introduction: Program Design (5 minutes)
- Introduce mini-project assignment
- Students will design (not code) a simple program
- Design must specify:
- Program purpose
- Required inputs
- Expected outputs
- How inputs are transformed into outputs
Closing (10 minutes)
-
Mini-Project Work Time (7 minutes)
- Students begin working on their program designs
- Teacher circulates to provide guidance
-
Preview Week 2 (3 minutes)
- Explain that next week will focus on program design and development processes
- Mini-projects will continue to be developed throughout the unit
Assessment
- Formative: Lab worksheet completion and accuracy
- Mini-Project: Quality of program design specification
Differentiation
For Advanced Students
- Design programs with multiple input types and conditional outputs
- Consider edge cases and error handling in their designs
For Struggling Students
- Provide a structured template for program design
- Suggest simpler programs with clear input/output relationships
Homework/Extension
- Complete the mini-project program design
- Research a program that uses an unusual or innovative input method
- Consider how different types of inputs might improve existing programs
Teacher Notes
- Emphasize that inputs are not just user actions but can come from many sources
- Connect input/output concepts to programs students use daily
- Ensure students understand the difference between an event and an input
- Preview that these concepts will be important for their final collaborative project