Concept Flow - Why input and output are required
Start Program
Get Input from User
Process Input
Produce Output
End Program
The program starts by getting input, then processes it, and finally shows output before ending.
name = input('Enter your name: ') print('Hello, ' + name + '!')
| Step | Action | Input/Variable State | Output |
|---|---|---|---|
| 1 | Program starts | name = undefined | |
| 2 | Input requested | Waiting for user input | |
| 3 | User enters 'Alice' | name = 'Alice' | |
| 4 | Print greeting | name = 'Alice' | Hello, Alice! |
| 5 | Program ends | name = 'Alice' |
| Variable | Start | After Input | Final |
|---|---|---|---|
| name | undefined | 'Alice' | 'Alice' |
Input lets a program get data from the user. Output shows results to the user. Without input, programs can't adapt. Without output, users can't see results. Together, they make programs interactive.