Practice Test 13 - AP Computer Science Principles

20 questions. Answer them in any order, then submit to see your score and every explanation.

  1. Introduction: A university uses facial recognition to take attendance in large lecture halls. Examples of Bias: Computing bias is a pattern of unfair outcomes produced by a system, often tied to the data it learns from and the choices people make when building it. Some facial recognition systems show higher error rates for women and for students with darker skin tones when those groups are underrepresented in the training images. How Bias Emerges: Bias can come from limited photo collections, poor image quality, and testing that does not reflect the student body. Impacts: Students may be marked absent incorrectly, which can affect grades and increase conflict with instructors. Mitigation Strategies: The university can use multiple attendance options, audit errors by group, and allow quick correction without penalties. According to the passage, what is a consequence of computing bias as described in the text?
  2. What is the decimal value of the 8-bit binary number 10110011?
  3. Based on the simulation described, an environmental science class builds a climate change model to explore local sea-wall planning. The real-world problem is estimating future flooding risk without waiting decades for measurements. The simulation advances year by year from 2025 to 2100. CarbonEmissionIndex starts at 100 and changes by emissionReduction (0%–5% per year). TemperatureIncrease (in °C) rises when emissions stay high, and SeaLevelRise (in cm) increases as temperature rises. A simple feedback loop is included: as TemperatureIncrease grows, iceMeltFactor (low/medium/high) increases, which further accelerates SeaLevelRise in later years. The algorithm runs multiple scenarios, compares outputs to historical temperature records for calibration, and then repeats with slightly adjusted sensitivity values until the 1990–2020 trend is closely reproduced. Example: setting emissionReduction to 3% per year slows TemperatureIncrease, which later reduces SeaLevelRise compared with 0% reduction. Which factor is most critical to the simulation's accuracy?
  4. The widespread use of file-sharing software for downloading and distributing copyrighted movies and music without payment or permission raises significant legal and ethical concerns. This practice directly challenges the value and ownership of what?
  5. A user repeatedly edits and saves a digital photo using a JPEG format, which is a lossy compression scheme. What is the most likely outcome for the image after many cycles of editing and saving?
  6. A user installs a software utility from the Internet. Weeks later, they discover that their online banking credentials have been stolen. A security expert determines that the utility included a hidden program that captured all of the user's keyboard inputs. This method of attack is known as which of the following?
  7. When a user accesses a website, their browser uses the Hypertext Transfer Protocol (HTTP). What is the primary role of HTTP in this context?
  8. A streaming video service uses a program to recommend new shows to a user. The program's recommendations are based on the user's previously watched shows. In this context, the list of previously watched shows serves as part of the program's:
  9. A school network deploys educational software to aid remote learning across several grade levels. The program provides interactive lessons with short checks for understanding, then uses student responses to select follow-up practice. It keeps a limited log of learning events, including attempts, time on task, and which hints were used, and it updates a skill profile over time. Teachers, tutors, and curriculum leaders use summaries to identify common misconceptions and adjust live instruction accordingly. Students see progress indicators designed to motivate steady effort rather than competition. During development, students and families gave feedback that excessive tracking felt intrusive, so the team restricted collection to what supports learning and removed older details when no longer needed. The program's purpose is to make remote instruction more responsive while respecting user concerns. Based on the passage, what purpose does the program serve in its context of use?
  10. Refer to the text: in genome sequencing, distributed nodes communicate via network messages, unlike tightly coupled parallel processors. What is a key difference between parallel and distributed computing?
  11. Based on the scenario, a game awards points when a player collects coins. Input: integer coinsCollected (may be 0 or more). Output: integer score added for this event. Rules: each coin is worth 10 points; if coinsCollected is at least 5, add a 50-point bonus once. Constraints: handle all nonnegative integers; AP-style pseudocode. A student writes: PROCEDURE CoinScore(coinsCollected) score <- 0 score <- coinsCollected * 10 IF coinsCollected > 5 score <- score + 50 RETURN score Which step is necessary to ensure the procedure works correctly?
  12. Based on the simulation described, a transportation department runs a traffic flow simulation to coordinate signals along a busy corridor with five intersections. The real-world problem is stop-and-go driving that increases travel time and emissions. The model uses vehicleDensity (low/medium/high), greenTime (15–55 seconds) for each light, and offset (0–40 seconds) between consecutive lights. Each simulated minute, vehicles advance if the downstream block has space; otherwise they queue. The algorithm iteratively refines timings: run 60 minutes, compute corridorTravelTime and totalStops, then adjust offsets to create a "green wave" for the dominant direction while keeping side-street delay below a limit. It repeats until corridorTravelTime improves by less than 1% over three iterations. Example: increasing offset between Light 2 and Light 3 can reduce totalStops eastbound, but may worsen westbound travel. Which variable, when altered, significantly changes the outcome?
  13. A popular mapping application improves its traffic predictions by collecting and analyzing anonymous speed and location data from thousands of its users who are currently driving. This practice is an example of which of the following?
  14. A small business hosted its website in a cloud service with 2 regions. The website ran in Region 1, but Region 1 had an outage. The cloud provider redirected requests to Region 2 automatically, and customers still browsed products. Later, the provider restored Region 1 and returned traffic gradually. Based on the scenario described, which mechanism ensures system operation when a component fails?
  15. A programmer needs to sort a large list of names alphabetically. The programmer can either write a custom sorting algorithm or use a sorting procedure from a standard, built-in library. Why is using the library procedure often a better choice?
  16. Which of the following is an example of the World Wide Web using the Internet?
  17. Which of the following binary numbers has the smallest decimal value?
  18. Using computing resources to knowingly spread disinformation to influence a political election is best described as an ethical concern because it...
  19. Which of the following code segments correctly implements the logic: "If it's raining AND cold, wear a coat. Otherwise, wear a jacket"?
  20. The 8-bit sequence 01000001 is stored in a computer's memory. Which of the following statements is most accurate about what this bit sequence represents?

Practice tests