Curriculum

Curriculum

Separate Inputs from Outputs

Scenario

A room-booking function takes the booking details and returns a yes-or-no decision.

Card3
Input0
Output0

Try it yourself

Sort each card into Input (what goes in) or Output (what comes out).

Reveal the explanation
  1. Requested time

    The student supplies the time.

  2. Booking accepted or declined

    The program returns this decision as the result.

  3. 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.