AP CSP
2Big Idea 2: Data
AP CSP topic 2.4

Using Programs with Data

Programs help people process far more data than they could by hand. Common tasks include filtering (keeping only rows that match a condition), sorting, combining data sets, and summarizing with counts, averages, or charts. Visualizations such as bar graphs and maps make patterns easier to see. Spreadsheets and simple programs let anyone ask questions of data, but the answers are only as good as the data that goes in.

Picture it8Walk9Bus5Car2Bike
A chart makes a pattern easy to see. Here: how 24 students get to school. Most walk or take the bus.

Using Programs with Data vocabulary

  • Filter: Keeping only the data that meets a condition, such as students in grade 10.
  • Data visualization: A chart, graph, or map that shows data so patterns are easier to see.
  • Scalability: How well a solution keeps working as the amount of data grows.
  • Data set: A collection of related data, often organized in rows and columns.

AP-style practice questions

Try each one, then open the answer. To save your progress, take this quiz in the interactive course.

Skill: Computing Innovations
A library has a spreadsheet with columns: Title, Author, Genre, Year, TimesBorrowed.

1. Which of the following questions can be answered using only this spreadsheet?

  1. (A) Which mystery book was borrowed the most?
  2. (B) How many pages does each book have?
  3. (C) Which borrowers liked each book?
  4. (D) Which books are missing from the shelf right now?
Show answer

(A) Which mystery book was borrowed the most? Filtering by Genre and sorting by TimesBorrowed answers it. The others need data the spreadsheet does not have.

Skill: Abstraction in Program Development

2. A teacher wants to find all students with a grade above 90. Which data operation should the teacher use?

  1. (A) Filter
  2. (B) Compress
  3. (C) Encrypt
  4. (D) Concatenate
Show answer

(A) Filter Filtering keeps only the rows that meet a condition.

Skill: Computing Innovations

3. Which of the following is the main advantage of using a program instead of doing the work by hand to analyze a data set with one million rows?

  1. (A) The program guarantees the data is correct
  2. (B) The program can process large amounts of data quickly
  3. (C) The program removes all bias from the data
  4. (D) The program makes the data smaller
Show answer

(B) The program can process large amounts of data quickly Programs scale to large data sets, but they cannot fix bad data.

Skill: Computing Innovations

4. A researcher wants to show how average temperature changed each year from 1990 to 2025. Which visualization is most appropriate?

  1. (A) A line graph with year on one axis and temperature on the other
  2. (B) A single number showing the 2025 temperature
  3. (C) A list of all daily temperatures
  4. (D) A pie chart of the years
Show answer

(A) A line graph with year on one axis and temperature on the other A line graph shows a trend over time.

Open 2.4 in the interactive course