Practice Test 12 - AP Computer Science Principles
19 questions. Answer them in any order, then submit to see your score and every explanation.
- A school app must sort student test scores (integers) in ascending order, allowing duplicates and possibly an empty list; input is scoreList, output is sortedScoreList. Based on the described problem, Which algorithm would efficiently solve the problem described?
- A social media influencer posts a video containing a short, unaltered clip from a popular movie. The movie studio issues a takedown notice for copyright infringement. The influencer claims their use of the clip is a form of commentary. This dispute highlights the legal and ethical complexity surrounding...
- Based on the simulation described, a coastal city runs a climate change simulation to compare two policy proposals: modest versus aggressive emissions cuts. The real-world problem is choosing infrastructure investments with limited budgets. The simulation steps yearly, updating CarbonEmissionIndex using emissionReduction (0%–5% per year). TemperatureIncrease rises when emissions remain high, and SeaLevelRise increases as temperature rises. A feedback loop increases iceMeltFactor from low to medium to high when TemperatureIncrease crosses preset thresholds, accelerating SeaLevelRise in later years. After each full run, the city compares the simulated 2000–2020 temperature slope to observed records and tweaks the temperatureSensitivity parameter, repeating until the slope aligns. Example: with emissionReduction at 4%, TemperatureIncrease grows more slowly, delaying the switch to high iceMeltFactor and reducing late-century SeaLevelRise. How does the simulation model feedback loops?
- ## Economic Barriers: When Connectivity Depends on Income ### Defining the Digital Divide The digital divide is the gap between people who have dependable access to internet service, devices, and digital skills and those who do not. Its significance is clear: without access, individuals may struggle to learn, find jobs, and use essential services. ### Who Is Most Affected Economic barriers often shape the divide. - Socioeconomic status: Monthly broadband fees and device costs can be prohibitive. - Geographic location: Some areas have fewer providers, raising prices. - Age: Older adults may need extra support to use online services even after gaining access. ### Evidence and Examples According to a 2021 Pew Research Center report, adults with lower incomes are less likely to have home broadband than higher-income adults. In practical terms, Jordan may complete homework on a phone because the family cannot afford both broadband and a laptop, while a higher-income classmate uses a desktop and home Wi-Fi for research and tutoring. ### Efforts to Bridge the Divide Many communities pursue multiple strategies: - Discounted internet plans and device subsidies - School- or library-based device lending - Community Wi-Fi in public spaces - Digital literacy workshops to build confidence ### Why One Fix Is Not Enough Lower prices help, but access also depends on device availability and skills. Effective solutions combine affordability with training and consistent support. Based on the text, which of the following best describes a strategy to bridge the digital divide?
- An Online Retail System uses data abstraction to recommend products. Raw logs record each click and purchase: (customerID, itemID, time, price, ratingText). The system simplifies this into an abstract customer profile with categories: preferredCategories, averageSpend, and recentPurchases. It also computes purchase patterns, such as "often buys running shoes after viewing fitness trackers." A recommendation algorithm then compares a shopper's profile to patterns and selects items. Example pseudocode:
IF profile.preferredCategories contains "Fitness" AND profile.averageSpend > 50: recommend(topItems["Fitness"])Based on the scenario described, identify the process that uses abstraction to convert raw data into actionable insights. - A city's emergency alert system sent short messages from a central office to many radio towers. Because messages traveled through noisy links, a few packets occasionally arrived with altered bits. Each packet included extra information that let the receiver notice a mismatch. When a mismatch appeared, the receiver corrected small errors when possible; otherwise it requested the packet again. This helped ensure that evacuation notices were not changed into confusing text. During a thunderstorm, the system still delivered accurate alerts to most towers. In the example given, which mechanism ensures system operation when a component fails?
- A home security company monitored sensors over a wireless network. Sometimes interference flipped bits in a message, so the system added a small check value to each packet. If the check did not match, the receiver requested the packet again, and the correct alert was delivered. This kept door and window events accurate even on noisy nights. In the example given, how does the described system maintain functionality during a failure?
- Refer to the text: In genome sequencing, distributed computing stores reads across networked nodes and uses message passing; if one node fails, other nodes continue and data can be re-copied. How does distributed computing enhance fault tolerance?
- Not every effect of a computing innovation is anticipated in advance by its designers. Which of the following provides the best example of an unintended effect?
- Which of the following statements best describes a significant trade-off of using lossy compression?
- Which of the following is the most likely source of bias in the collected data?
- Which of the following is guaranteed when using a lossless data compression algorithm?
- A Monte Carlo program estimates how often a savings goal is reached by randomly sampling monthly income changes and expenses. Randomness is needed because real spending and earnings vary and cannot be predicted exactly. One run may reach the goal early, while another falls short due to higher sampled expenses. Based on the scenario above, how do random values affect the outcome of this simulation?
- A playlist list of strings starts as ['Intro','Skyline','Drift','Neon','Finale']. You remove 'Neon' because it is unavailable offline before your run. Based on the scenario above, how does the list change after removing the element?
- A passage in Arial examines Intellectual Property and Open Source in a robotics club using code from a public repository. It describes students modifying an open-source motor-control program and combining it with a proprietary sensor module donated by a company. It defines intellectual property as protected code and inventions, and notes open-source licenses can impose conditions on redistribution, while proprietary modules may be protected as trade secrets. Stakeholders include students, the donating company, maintainers, competition organizers, and judges. Scenarios include posting the combined code online, receiving a takedown request, and debating whether to publish only the open-source portion. According to the passage, what are the potential consequences of redistributing code while ignoring license conditions?
- A remote-learning program is built to provide interactive history lessons for students who cannot attend class in person. Each unit includes short readings, primary-source questions, and activities where students sort claims into "supported" or "unsupported" categories. The program tracks which reasoning skills are strong, which mistakes repeat, and how often students revise their responses after feedback. It uses that information to recommend the next activity, either reinforcing a skill or introducing a new challenge. Teachers and school leaders review dashboards that summarize class trends, helping them plan live discussions that address common gaps. In surveys, students said they preferred clear, calm prompts over harsh error messages, so the team revised the tone and reduced unnecessary interruptions. The program's purpose is to deliver instruction that adapts to student needs while keeping learners engaged. According to the text, which feature of the program contributes most to its efficiency?
- Binary Basics passage: Binary is a base-2 system using only 0 and 1, while decimal is base-10 using digits 0–9. For instance, decimal 6 is binary 110. Computers use binary states (off/on) as bits, and group bits into bytes to store and process data. According to the text, How does binary differ from the decimal system?
- A coding contest problem asks for Fibonacci(n) with and a 1-second limit. Two solutions are shown:
Pseudocode (Naive Recursion):
procedure fibRecursive(n) if n <= 1 return n return fibRecursive(n - 1) + fibRecursive(n - 2)Time complexity: . Pseudocode (Dynamic Programming):procedure fibDP(n) if n <= 1 return n prev <- 0 curr <- 1 for i <- 2 to n next <- prev + curr prev <- curr curr <- next return currTime complexity: . What is the primary advantage of using fibDP over fibRecursive? - Even if an email appears to be from a known sender, what is the most significant security risk of opening an unexpected file attachment?