---
title: "AP Computer Science Principles Unit 2 Practice Test"
description: "A timed AP Computer Science Principles Unit 2 (Data) practice test in the AP format, drawn from 819 multiple-choice questions written for the unit. The standard version takes about 34 minutes."
canonical: "https://fiveable.me/ap-comp-sci-p/unit-test/2"
type: "unit-test"
subject: "AP Computer Science Principles"
unit: "Unit 2"
---

# AP Computer Science Principles Unit 2 Practice Test

## Overview

A timed AP Computer Science Principles Unit 2 (Data) practice test in the AP format, drawn from 819 multiple-choice questions written for the unit. The standard version takes about 34 minutes.

## Test Format

- 20 Multiple Choice Questions (34 minutes)

## Practice Questions

### Question 1

A global weather monitoring system aggregates temperature readings from thousands of different sensor types, each using different file formats and units of measurement. What is the primary data processing challenge this system faces before it can generate accurate climate models?

- (A) The system must clean the data to standardize the inconsistent formats without changing the meaning.
- (B) The system must clean the data to encrypt the sensitive values without changing the meaning.
- (C) The system must clean the data to compress the large files without changing the meaning.
- (D) The system must clean the data to backup the original records without changing the meaning.

**Answer: (A)** Recognizing that data from multiple sources is often non-uniform allows for the identification of data cleaning as the necessary process to standardize formats for analysis.

### Question 2

A variable `deviceID` uses a 5-bit binary sequence to store unique identifiers for sensors on a network. To generalize the system to support 60 unique devices, which change to the variable's representation is required?

- (A) Increase to 6 bits to support 64 unique values
- (B) Increase to 7 bits to support 128 unique values
- (C) Increase to 8 bits to support 256 unique values
- (D) Maintain 5 bits to support 32 unique values

**Answer: (A)** Calculating the capacity of binary sequences ($2^n$) determines that 6 bits provide 64 unique combinations ($2^6$), which is the minimum needed to cover 60 devices.

### Question 3

A variable `code` accepts data from two sources. Source A sends binary `101010` and Source B sends decimal 42. Which statement correctly compares the values stored in the variable?

- (A) Both are equal because 101010 equals decimal 42
- (B) Source A is larger because 101010 equals decimal 52
- (C) Source B is larger because 101010 equals decimal 21
- (D) Source A is larger because 101010 equals decimal 84

**Answer: (A)** Converting the binary sequence $101010$ ($32 + 8 + 2$) confirms it equals decimal 42, meaning both sources provide identical values.

### Question 4

A variable `settings` stores the binary value `11001100` to represent active server clusters. If the system generalizes this data for a decimal display, what value is output?

- (A) 204, calculated by summing 128, 64, 8, and 4
- (B) 200, calculated by summing 128, 64, and 8
- (C) 192, calculated by summing 128 and 64 only
- (D) 240, calculated by summing 128, 64, 32, and 16

**Answer: (A)** Summing the active bit positions ($128 + 64 + 8 + 4$) correctly converts the binary sequence $11001100$ to its decimal equivalent of 204.

### Question 5

A development team wants to understand why users are abandoning their app after the first screen, rather than just knowing that they are leaving. They have access to server logs showing session duration and a database of user support emails. Which analysis approach would best generate the desired knowledge?

- (A) Analyzing the content of support emails to identify specific user frustrations
- (B) Analyzing the timestamps in server logs to calculate average session length
- (C) Analyzing the total count of daily downloads to determine general app popularity
- (D) Analyzing the file size of the app code to optimize network download speeds

**Answer: (A)** Qualitative data from support emails provides the context and reasons ('why') behind user behaviors, which quantitative logs cannot directly reveal.

### Question 6

A team is updating a website to be more accessible. They have data logs of user interactions, including input device types (mouse, keyboard, touchscreen). Which insight derived from this data would best inform improvements for users with motor impairments?

- (A) Identifying features that are rarely accessed by users relying only on keyboards
- (B) Identifying the total number of users who visit the website on mobile devices
- (C) Identifying the average time all users spend reading the homepage content
- (D) Identifying the geographic regions where the website has the most traffic

**Answer: (A)** Users with motor impairments often rely on keyboards; low usage of features by this group suggests accessibility barriers that need fixing.

### Question 7

A citizen science app allows users to upload photos of local plants. The developers want to use this data to track the spread of an invasive species. Which data element associated with the photos is most critical to analyze for this specific purpose?

- (A) The geolocation metadata attached to each uploaded photo to map distribution
- (B) The resolution and file size of each uploaded photo to ensure image quality
- (C) The username of the person who uploaded the photo to track user activity
- (D) The time of day the photo was uploaded to the server to monitor traffic

**Answer: (A)** Tracking the spread of a species requires spatial data; geolocation metadata provides the necessary 'where' to map distribution patterns.

### Question 8

A social media platform wants to encourage more positive interactions. They run a test where Group A sees a "Like" button and Group B sees a "Respect" button. Which analysis of the resulting data would best determine which button fosters better collaboration?

- (A) Comparing the number of positive comments per post between Group A and Group B
- (B) Analyzing the metadata of posts to determine which button type receives more engagement
- (C) Comparing the average length of user comments between Group A and Group B
- (D) Surveying users after the test about which button they preferred using

**Answer: (A)** Comparing interaction quality (positive comments) between the groups directly measures the desired outcome of fostering better collaboration.

### Question 9

A messaging app team wants to expand into a new region. They have a dataset of current user messages including timestamps, languages used, and device types. Which analysis would best help them understand the cultural needs of the new user base?

- (A) Analyzing the frequency of specific languages and regional idioms in messages
- (B) Analyzing the timestamps to determine the peak server usage hours globally
- (C) Analyzing the device types to optimize the app's battery usage efficiency
- (D) Analyzing the total number of messages sent to determine server capacity

**Answer: (A)** Language and idiom usage directly reflects cultural communication patterns, providing the necessary insight for cultural adaptation.

### Question 10

A team receives survey responses saying users find a feature "confusing," but the usage logs show high engagement with that feature. To resolve this contradiction and improve the innovation, which analysis strategy is most appropriate?

- (A) Conducting follow-up interviews to understand the qualitative reasons for the confusion
- (B) Relying solely on the usage logs because quantitative data is always more accurate
- (C) Removing the feature immediately based on the negative survey feedback received
- (D) Increasing the font size of the feature's text to make it easier to read

**Answer: (A)** When quantitative data (usage) contradicts qualitative feedback (surveys), deeper qualitative analysis is needed to understand the 'why' behind the user experience.

## Review the Unit

- [2.1 Binary Numbers](/ap-comp-sci-p/unit-2/binary-numbers/study-guide/k2SYC0VlP2hcRfVUC75l)
- [2.2 Data Compression](/ap-comp-sci-p/unit-2/data-compression/study-guide/21yLa92Ec2potY7nGQfu)
- [2.3 Extracting Information from Data](/ap-comp-sci-p/unit-2/extracting-information-data/study-guide/EFuLgc6tL71cegDFjXRl)
- [2.4 Using Programs with Data](/ap-comp-sci-p/unit-2/using-programs-with-data/study-guide/UGafCp61FHKkWAvRBJbQ)
- [Big Idea 2 Overview: Data](/ap-comp-sci-p/unit-2/review/study-guide/YlNeQAM5snCDFEtp0CGd)

## Other Unit Tests

- [Unit 1: Creative Development](/ap-comp-sci-p/unit-test/1)
- [Unit 3: Algorithms and Programming](/ap-comp-sci-p/unit-test/3)
- [Unit 4: Computer Systems & Networks](/ap-comp-sci-p/unit-test/4)
- [Unit 5: Impact of Computing](/ap-comp-sci-p/unit-test/5)

## About This Document

Canonical Fiveable pages are available as Markdown at the same path plus `.md`.

- [llms.txt](https://fiveable.me/llms.txt): index of Fiveable's sections and URL patterns
- [llms-full.txt](https://fiveable.me/llms-full.txt): complete subject and unit listing
- [MCP server](https://fiveable.me/mcp): call Fiveable as tools instead of fetching pages (`https://fiveable.me/api/mcp`)
- [MCP server for AP teachers](https://fiveable.me/mcp/teachers): a teacher's classes, assignments and AP-rubric grading (`https://fiveable.me/api/mcp/teacher`)
