AP CSP Unit 1: Creative Development

290 multiple-choice questions on AP Computer Science Principles Unit 1, Creative Development, organized by topic. They are not tied to any one class or teacher: they follow the College Board course framework. Learn the 30 key terms with the flashcards first, then test yourself. Every answer comes with a short explanation.

Take the practice test · Flashcards · All study tools

What it covers

  1. 1.1 Collaboration
  2. 1.2 Program function and purpose
  3. 1.3 Program design and development
  4. 1.4 Identifying and correcting errors

Key terms

1.1 Collaboration

User feedback
Comments and reactions from people who will use a program, used to improve it
Diverse perspectives
Varied backgrounds and viewpoints on a team that help catch bias and missed needs
Consultation
Asking users, clients, or experts for guidance while a program is being developed
Pair-programming driver
The person at the keyboard who types the code in a pair-programming session
Pair-programming navigator
The person who reviews, plans, and watches for mistakes while the driver types

1.2 Program function and purpose

Program purpose
The problem a program is intended to solve or the creative interest it pursues
Program input
Data sent to a program from a user, device, file, or another program
Program output
Data or actions a program produces, such as displayed text, sound, or a saved file
Program behavior
How a program functions as it runs and how a user interacts with it
Event handler
Code that runs when a specific event, such as a click or key press, occurs
Computing innovation
A new or improved computing technology or program created to serve a purpose

1.3 Program design and development

Program documentation
Written descriptions and comments that explain a program's purpose and how it works
Program specification
A description of what a program should do, including requirements and constraints
Development process
The steps used to create a program, such as investigating, designing, prototyping, and testing
Investigation
The phase of development that gathers information about the problem, users, and constraints
Code acknowledgment
Giving credit for code, libraries, or segments that a developer did not write

1.4 Identifying and correcting errors

Iterative development
Repeatedly refining a program through cycles of design, testing and feedback
Incremental development
Building a program in small pieces, testing each before adding more
Syntax error
A mistake in the rules of the language that prevents the program from running
Logic error
A mistake in the algorithm that makes the program behave incorrectly
Run-time error
An error that occurs during execution
Overflow error
Trying to represent a number outside the available range
Pair programming
Two programmers sharing one workstation, switching driver and navigator roles
Event-driven programming
Code runs in response to events such as clicks or key presses
Debugging
The process of finding and correcting errors in a program
Test case
A specific input, and the output that should result, used to check a program's behavior
Hand tracing
Stepping through code by hand and recording how variable values change
Boundary case
A test input at or just beyond the edge of a valid range
Expected output
The result a correct program should produce for a given test input
User testing
Having intended users try a program so developers can observe problems and gather feedback

Sample practice questions

  1. Which is a benefit of collaboration when developing a program?

    1. Teammates with diverse perspectives can find more errors and design better solutions
    2. Programs written by teams never contain bugs, since every line is checked twice
    3. Collaboration always cuts development time in half, whatever the project size
    4. Only one team member needs to understand how the finished program works

    Answer: A. Teammates with diverse perspectives can find more errors and design better solutions Diverse viewpoints help identify user needs, catch errors, and avoid bias.

  2. The purpose of a program is best described as

    1. the number of lines of code the program contains
    2. the programming language the program is written in
    3. the problem it solves or the creative interest it pursues
    4. the speed of the computer the program runs on

    Answer: C. the problem it solves or the creative interest it pursues Programs are developed with a purpose, such as solving a problem or creative expression.

  3. In an iterative development process, developers

    1. repeatedly design, test and refine a program based on feedback
    2. write the entire program once and never change it afterward
    3. skip testing until the finished program has been released
    4. design only the user interface and leave the logic for later

    Answer: A. repeatedly design, test and refine a program based on feedback Iteration means revisiting earlier phases to improve the program.

  4. A program that fails to run because of a misspelled keyword has a

    1. logic error
    2. run-time error
    3. syntax error
    4. overflow error

    Answer: C. syntax error Syntax errors break the rules of the language and prevent the program from running.

  5. Pair programming is a practice in which

    1. two programmers write separate versions of the same program and keep the faster one
    2. two programmers share one computer, one coding and one reviewing, and switch roles
    3. one programmer writes the code and another writes the documentation afterward
    4. a program is written in two different languages so each partner can use one

    Answer: B. two programmers share one computer, one coding and one reviewing, and switch roles The driver types while the navigator reviews and plans, which reduces errors.

  6. A program's inputs can come from

    1. only a keyboard attached to the computer running it
    2. users, devices such as sensors, other programs, or files
    3. only the programmer, who types values into the code
    4. only the internet, through web pages and downloads

    Answer: B. users, devices such as sensors, other programs, or files Inputs are data sent to a program from many possible sources.

  7. An incremental development process involves

    1. writing all of the code at once and testing everything together at the end
    2. testing only the final version of the program, just before it is released
    3. breaking the problem into pieces and making sure each works before adding it
    4. developing several unrelated programs at once and choosing the best one

    Answer: C. breaking the problem into pieces and making sure each works before adding it Building and testing piece by piece helps find errors early.

  8. A program runs but produces incorrect results because a formula uses the wrong operator. This is a

    1. syntax error
    2. logic error
    3. run-time error
    4. overflow error

    Answer: B. logic error Logic errors let the program run but cause incorrect behavior.

  9. Gathering feedback from people who will use a program is important because

    1. it guarantees that the finished program will run faster on any device
    2. it removes the need to test the program before it is released
    3. it helps developers understand user needs and improve the program
    4. it is required by law before any program can be distributed

    Answer: C. it helps developers understand user needs and improve the program User feedback during iterative development reveals what works and what needs to change.

  10. An event-driven program is one in which

    1. statements always run in order from top to bottom with no user interaction
    2. the program runs only once a day
    3. every procedure runs at the same time
    4. code runs in response to events such as a button click or key press

    Answer: D. code runs in response to events such as a button click or key press Events like clicks or timers trigger the code associated with them.

Practice all 290 questions

More AP Computer Science Principles

Studying for a test in your own class? Make a practice test from your class notes.