Skip to main content
AP CSP course

F02 · Topic 1.2

Input to output investigation

Specify and trace a school-capacity message generator. Separate user purpose, inputs, processing, displayed output and internal state.

1. Predict first

The fixed model receives name Art and places text 5. Predict the visible output; then predict Code with 0.

Change it · step through · explain

Change an input, predict what will happen, then advance one step. Read why the state changes, reset and experiment. This fixed teaching model does not save progress or award XP.

Ready · Make a prediction

Ready to experiment
  1. Input 1ArtWaiting
  2. Input 25Waiting

Ready to experiment

Why: Predict the first change, then advance one step.

Try this: Try 0, 007, an empty input and a letter. Does validation or display change?

2. Build your procedure

Write a procedure or flowchart that validates an ASCII whole number of places, produces the capacity message and explains how it serves a student choosing a club.

Use AP CSP pseudocode, a language you know, or precise plain language. Your code is not executed here. Use the classroom assignment to save your response.

3. Check boundaries

Public worked tests for the fixed model
InputExpectedWhy this case
Art /5Art has 5 places left.Valid positive input.
Code /0Code is full.Zero has a specified branch.
Art /-1Validation messageA signed value violates the supplied input contract.

4. Explain and reflect

If an internal variable stores matches but nothing displays it, is matches automatically an output? Explain.

Model limits: Runs only the documented capacity-message model, with bounded text. It does not execute the student’s programme.

Teacher guidance and scoring