AP Computer Science Principles Unit 2 practice questions
Try 10 multiple-choice questions from Unit 2 here. Pick an answer to see why it's right or wrong, then take the timed test above for a full AP-style set.
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?
The system must clean the data to standardize the inconsistent formats without changing the meaning.
The system must clean the data to encrypt the sensitive values without changing the meaning.
The system must clean the data to compress the large files without changing the meaning.
The system must clean the data to backup the original records without changing the meaning.
Show answer
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
deviceIDuses 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?Increase to 6 bits to support 64 unique values
Increase to 7 bits to support 128 unique values
Increase to 8 bits to support 256 unique values
Maintain 5 bits to support 32 unique values
Show answer
Answer: (A)
Calculating the capacity of binary sequences () determines that 6 bits provide 64 unique combinations (), which is the minimum needed to cover 60 devices.
Question 3
A variable
codeaccepts data from two sources. Source A sends binary101010and Source B sends decimal 42. Which statement correctly compares the values stored in the variable?Both are equal because 101010 equals decimal 42
Source A is larger because 101010 equals decimal 52
Source B is larger because 101010 equals decimal 21
Source A is larger because 101010 equals decimal 84
Show answer
Answer: (A)
Converting the binary sequence () confirms it equals decimal 42, meaning both sources provide identical values.
Question 4
A variable
settingsstores the binary value11001100to represent active server clusters. If the system generalizes this data for a decimal display, what value is output?204, calculated by summing 128, 64, 8, and 4
200, calculated by summing 128, 64, and 8
192, calculated by summing 128 and 64 only
240, calculated by summing 128, 64, 32, and 16
Show answer
Answer: (A)
Summing the active bit positions () correctly converts the binary sequence 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?
Analyzing the content of support emails to identify specific user frustrations
Analyzing the timestamps in server logs to calculate average session length
Analyzing the total count of daily downloads to determine general app popularity
Analyzing the file size of the app code to optimize network download speeds
Show answer
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?
Identifying features that are rarely accessed by users relying only on keyboards
Identifying the total number of users who visit the website on mobile devices
Identifying the average time all users spend reading the homepage content
Identifying the geographic regions where the website has the most traffic
Show answer
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?
The geolocation metadata attached to each uploaded photo to map distribution
The resolution and file size of each uploaded photo to ensure image quality
The username of the person who uploaded the photo to track user activity
The time of day the photo was uploaded to the server to monitor traffic
Show answer
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?
Comparing the number of positive comments per post between Group A and Group B
Analyzing the metadata of posts to determine which button type receives more engagement
Comparing the average length of user comments between Group A and Group B
Surveying users after the test about which button they preferred using
Show answer
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?
Analyzing the frequency of specific languages and regional idioms in messages
Analyzing the timestamps to determine the peak server usage hours globally
Analyzing the device types to optimize the app's battery usage efficiency
Analyzing the total number of messages sent to determine server capacity
Show answer
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?
Conducting follow-up interviews to understand the qualitative reasons for the confusion
Relying solely on the usage logs because quantitative data is always more accurate
Removing the feature immediately based on the negative survey feedback received
Increasing the font size of the feature's text to make it easier to read
Show answer
Answer: (A)
When quantitative data (usage) contradicts qualitative feedback (surveys), deeper qualitative analysis is needed to understand the 'why' behind the user experience.
What's on the AP Computer Science Principles Unit 2 practice test
The standard version takes about 34 minutes and follows the timing and directions of the AP exam, sized to one unit:
- 20 Multiple Choice Questions (34 minutes)
Questions are drawn from 778 multiple-choice questions written for Unit 2, Data.
Review Unit 2 before you start
- 2.1 Binary Numbers
- 2.2 Data Compression
- 2.3 Extracting Information from Data
- 2.4 Using Programs with Data
- Big Idea 2 Overview: Data