← AP CSP

Creative development: AP CSP practice

Designing and building programs. 10 questions in the style of the AP CSP exam.

Sample questions

A student describes her app like this: "It helps students at my school find an empty study room quickly." Which part of the program does this statement best describe?

  1. The program's purpose
  2. The program's function
  3. The program's input
  4. The program's output

A programmer forgets a closing bracket, and the program will not run at all. Which type of error is this?

  1. Syntax error
  2. Logic error
  3. Rounding error
  4. Overflow error

A program produces the wrong output for some inputs. Which TWO actions are most likely to help the programmer find the logic error? I. Add DISPLAY statements to show the values of variables at key points II. Hand-trace the code with a small set of test data III. Rename the file the program is saved in IV. Increase the brightness of the screen

  1. I and III
  2. II and IV
  3. III and IV
  4. I and II