← AP CSP

Data abstraction: AP CSP practice

Using lists to manage complexity. 4 questions in the style of the AP CSP exam.

Sample questions

A program stores the names of 30 students. Why is it better to use one list than 30 separate variables?

  1. Separate variables cannot hold names
  2. Lists make the program impossible to change
  3. A list uses no memory
  4. A list lets the program process all the names with one loop, and it is easy to add or remove students