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.
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.
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?
- (A) Which mystery book was borrowed the most?
- (B) How many pages does each book have?
- (C) Which borrowers liked each book?
- (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.
2. A teacher wants to find all students with a grade above 90. Which data operation should the teacher use?
- (A) Filter
- (B) Compress
- (C) Encrypt
- (D) Concatenate
Show answer
(A) Filter Filtering keeps only the rows that meet a condition.
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?
- (A) The program guarantees the data is correct
- (B) The program can process large amounts of data quickly
- (C) The program removes all bias from the data
- (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.
4. A researcher wants to show how average temperature changed each year from 1990 to 2025. Which visualization is most appropriate?
- (A) A line graph with year on one axis and temperature on the other
- (B) A single number showing the 2025 temperature
- (C) A list of all daily temperatures
- (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.