Separate Inputs from Outputs
Scenario
A room-booking function takes the booking details and returns a yes-or-no decision.
Try it yourself
Sort each card into Input (what goes in) or Output (what comes out).
Choose a category for every card.
Reveal the explanation
- Requested time
The student supplies the time.
- Booking accepted or declined
The program returns this decision as the result.
- Room availability
The program reads whether the room is free from the schedule.
Draw a box for the program. Put the first and third cards on the left (inputs going in) and the decision on the right (output coming out).
Your turn
For a new request, sort “chosen room,” “requested time,” and “confirmation message.”
Common mistake Treating the checker’s decision as an input the student supplies.
Check your work
The room and time are inputs. The confirmation message is an output.
This browser could not save your progress. Changes last until you leave the page.