Input and Output in Python
Input and Output in Python
Learning Objectives:
● Students will be able to use the input() function to get user input.
● Introducing Variables.
● Students will be able to combine input and output to create interactive programs.
Materials:
● Whiteboard or projector
● Markers or pens
Lesson Outline:
computers.
● Introduce the terms input (data provided to the computer) and output (data
● Briefly explain what programming languages are and how they are used to give
instructions to computers.
Activity 1: Hello World! (15 minutes):
screen.
1. Introduce the input() function as a way to get data from the user.
2. Demonstrate a program that uses input() to prompt the user for their name and
4. Guide students through writing a program that asks for the user's age and then
prints it back.
5. Challenge students to write a program that asks for two numbers, adds them
Wrap-up (5 minutes):
● Provide resources for further learning (e.g., online tutorials, practice problems).
Assessment:
Differentiation:
● For advanced students, provide challenges that involve more complex input and
● For struggling students, offer additional support and break down the activities into
smaller steps.
Extension Activities:
● Write programs that read data from files or write data to files.