The sample questions that follow illustrate the relationship between the curriculum framework and the AP Computer Science Principles Exam and serve as examples of the types of questions that will appear on the exam. Or you could use this Google form to practice these questions created by Mobile CSP teacher Mark Eisenhardt with video explanations of some of the answers. Show
Q-1: AP 2021 Sample Question: Which of the following best explains how data is typically assembled in packets for transmission over the Internet?
Q-2: AP 2021 Sample Question: Each student that enrolls at a school is assigned a unique ID number, which is stored as a binary number. The ID numbers increase sequentially by 1 with each newly enrolled student. If the ID number assigned to the last student who enrolled was the binary number 1001 0011, what binary number will be assigned to the next student who enrolls?
Q-4: AP 2021 Practice Question: A user purchased a new smart home device with embedded software andconnected the device to a home network. The user then registered the devicewith the manufacturer, setting up an account using a personal e-mail andpassword. Which of the following explains how a phishing attack could occuragainst the user of the smart home device?
Q-5: AP 2021 Sample Question: Which of the following school policies is most likely to have a positive impact on the digital divide?
Q-6: AP 2021 Sample Question: In a certain country, a person must be at least 16 years old to drive a car and must be at least 18 years old to vote. The variable age represents the age of a person as an integer. Which of the following expressions evaluates to true if the person is old enough to drive but not old enough to vote, and evaluates to false otherwise? I. (age ≥ 16) AND (age ≤ 18) II. (age ≥ 16) AND (NOT(age ≥ 18)) III. (age < 18) AND (NOT(age < 16))
Q-7: AP 2021 Sample Question: A Web site uses several strategies to prevent unauthorized individuals from accessing user accounts. Which of the following is NOT an example of multifactor authentication?
Q-8: AP 2021 Sample Question: A list of numbers has n elements, indexed from 1 to n. The following algorithm is intended to display the number of elements in the list that have a value greater than 100. The algorithm uses the variables count and position. Steps 3 and 4 are missing.Step 1: Set count to 0 and position to 1.Step 2: If the value of the element at index position is greaterthan 100, increase the value of count by 1.Step 3: (missing step)Step 4: (missing step)Step 5: Display the value of count.Which of the following could be used to replace steps 3 and 4 so that the algorithm works as intended?
Q-9: AP 2021 Sample Question: The following code segment is intended to set max equal to the maximum value among the integer variables x, y, and z. The code segment does not work as intended in all cases.Which of the following initial values for x, y, and z can be used to show that the code segment does not work as intended?
Q-10: AP 2021 Sample Question: A digital photo file contains data representing the level of red, green, and blue for each pixel in the photo. The file also contains metadata that describe the date andgeographic location where the photo was taken. For which of the following goals would analyzing the metadata be more appropriate than analyzing the data?
Q-11: AP 2021 Sample Question: The following procedure is intended to return the number of times the value val appears in the list myList. The procedure does not work as intended.Line 1: PROCEDURE countNumOccurences(myList, val)Line 2: {Line 3: FOR EACH item IN myListLine 4: {Line 5: count 0Line 6: IF(item = val)Line 7: {Line 8: count count + 1Line 9: }Line 10: }Line 11: RETURN(count)Line 12: }Which of the following changes can be made so that the procedure will work as intended?
Q-12: AP 2021 Sample Question: A certain computer has two identical processors that are able to run in parallel.Each processor can run only one process at a time, and each process must beexecuted on a single processor. The following table indicates the amount of timeit takes to execute each of three processes on a single processor. Assume thatnone of the processes are dependent on any of the other processes.ProcessExecution Time on Either ProcessorX 60 secondsY 30 secondsZ 50 secondsWhich of the following best approximates the minimum possible time to execute all three processes when the two processors are run in parallel?
Q-13: AP 2021 Sample Question: A sorted list of numbers contains 500 elements. Which of the following is closest to the maximum number of list elements that will be examined when performing a binary search for a value in the list?
Q-14: Questions 14–16 refer to the information below. Note: This is a representative sample of questions related to the reading passage. There will be five single-select multiple-choice questions related to a reading passage on the AP Exam.A chain of retail stores uses software to manage telephone calls from customers. The system was recently upgraded. Customers interacted with the original system using their phone keypad. Customers interact with the upgraded system using their voice.The upgraded system (but not the original system) stores all information from the calling session in a database for future reference. This includes the customer’s telephone number and any information provided by the customer (name, address, order number, credit card number, etc.).The original system and the upgraded system are described in the following flowcharts. Each flowchart uses the following blocks.AP 2021 Sample Question: The upgraded system uses a directory containing additional information not supplied by the customer. The directory is used to help direct calls effectively. Which of the following is LEAST likely to be included in the directory?
Q-15: AP 2021 Sample Question: Of the following potential benefits, which is LEAST likely to be provided by the upgraded system?
Q-16: AP 2021 Sample Question: Which of the following is the most likely data privacy concern of the upgraded system? Older Questions:
Q-19: A video-streaming Web site uses 32-bit integers to count the number of times each video has been played. In anticipation of some videos being played more times than can be represented with 32 bits, the Web site is planning to change to 64-bit integers for the counter. Which of thefollowing best describes the result of using 64-bit integers instead of 32-bit integers?
Q-20:
Q-21:
Q-22: Which of the following statements describes a limitation of using a computer simulation to model a real-world object or system?
Q-23: Biologists often attach tracking collars to wild animals. For each animal, the following geolocation data is collected at frequent intervals.The timeThe date The location of the animalWhich of the following questions about a particular animal could NOT be answered using only the data collected from the tracking collars?
Q-24: A certain social media Web site allows users to post messages and to comment on other messages that have been posted. When a user posts a message, the message itself is considered data. In addition to the data, the site stores the following metadata.The time the message was postedThe name of the user who posted the messageThe names of any users who comment on the message and the times the comments were madeFor which of the following goals would it be more useful to analyze the data instead of themetadata?
Q-25:
Q-26: Which of the following is a true statement about data compression?
Q-27: A programmer completes the user manual for a video game she has developed and realizes she has reversed the roles of goats and sheep throughout the text. Consider the programmer’s goal of changing all occurrences of “goats” to “sheep,” and all occurrences of “sheep” to “goats.” The programmer will use the fact that the word “foxes” does not appear anywhere in the original text.Which of the following algorithms can be used to accomplish the programmer’s goal?
Q-28: Consider the code segment below.If the variables onTime and absent both have the value false, what is displayed as a result of running the code segment?
Q-30: Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem?
Q-31: There are 32 students standing in a classroom. Two different algorithms are given for findingthe average height of the students.Algorithm AStep 1: All students stand.Step 2: A randomly selected student writes his or her height on a card and is seated.Step 3: A randomly selected standing student adds his or her height to the value on the card,records the new value on the card, and is seated. The previous value on the card is erased.Step 4: Repeat step 3 until no students remain standing.Step 5: The sum on the card is divided by 32. The result is given to the teacher.Algorithm BStep 1: All students stand.Step 2: Each student is given a card. Each student writes his or her height on the card.Step 3: Standing students form random pairs at the same time. Each pair adds the numberswritten on their cards and writes the result on one student’s card; the other student isseated. The previous value on the card is erased.Step 4: Repeat step 3 until one student remains standing.Step 5: The sum on the last student’s card is divided by 32. The result is given to the teacher.Which of the following statements is true? Q-32: The following question uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the bottom left square of the grid and facing right. Consider the following code segment, which moves the robot in the grid. Which of the following shows the location of the robot after running the code segment? Q-33: The figure below shows a robot in a grid of squares. The robot is represented as a triangle, which is initially facing upward. The robot can move into a white or gray square but cannot move into a black region. Consider the procedure MoveAndTurn below. Which of the following code segments will move the robot to the gray square? Q-34: A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attending the morning session, and the list afternoonList contains the names of all children attending the afternoon session. Only children who attend both sessions eat lunch at the camp. The camp director wants to create lunchList, which will contain the names of children attending both sessions. The following code segment is intended to create lunchList, which is initially empty. It uses the procedure IsFound (list, name), which returns true if name is found in list and returns false otherwise. FOR EACH child IN morningList { <MISSING CODE> } Which of the following could replace <MISSING CODE> so that the code segment works as intended? IF (IsFound (afternoonList, child)) { APPEND (lunchList, child) } IF (IsFound (lunchList, child)) { APPEND (afternoonList, child) } IF (IsFound (morningList, child)) { APPEND (lunchList, child) } IF ((IsFound (morningList, child)) OR (IsFound (afternoonList, child))) { APPEND (lunchList, child) }
Q-35: Consider the following program code.Which of the following best describes the result of running the program code?
Q-36: An office building has two floors. A computer program is used to control an elevator that travels between the two floors. Physical sensors are used to set the following Boolean variables.The elevator moves when the door is closed and the elevator is called to the floor that it is not currently on. Which of the following Boolean expressions can be used in a selection statement to cause the elevator to move?
Q-37: According to the domain name system (DNS), which of the following is a subdomain of the domain example.com?
Q-38: Which of the following are true statements about digital certificates in Web browsers? I. Digital certificates are used to verify the ownership of encrypted keys used in secured communication. II. Digital certificates are used to verify that the connection to a Web site is fault tolerant.
Q-39: Which of the following algorithms require both selection and iteration?Select two answers. Q-40: A teacher uses the following program to adjust student grades on an assignment by adding 5 points to each student’s original grade. However, if adding 5 points to a student’s original grade causes the grade to exceed 100 points, the student will receive the maximum possible score of 100 points. The students’ original grades are stored in the list gradeList, which is indexed from 1 to n. i ← 1 REPEAT n TIMES { <MISSING CODE> i ← i + 1 } The teacher has the following procedures available.Which of the following code segments can replace MISSING CODE so that the program works as intended? Select two answers. gradeList[i] ← min (gradeList[i] + 5, 100) gradeList[i] ← max (gradeList[i] + 5, 100) gradeList[i] ← gradeList[i] + 5 IF (gradeList[i] > 100) { gradeList[i] ← gradeList[i] - 5 } gradeList[i] ← gradeList[i] + 5 IF (gradeList[i] > 100) { gradeList[i] ← 100 } Additional Sample Questions:
Q-41: Which of the following are true statements about creating computational artifacts?I. A computational artifact must be created using a computer or computing device.II. A computational artifact must be created using a traditional, prescribed technique.III. Some computational artifacts are created by combining existing computational artifacts.
Q-42: A team of students is creating a video to advertise an upcoming school activity. While workingon the video, the students plan to meet every day to review their progress and plan next steps.Which of the following is a FALSE statement about the described collaborative process?
Q-43: Which of the following are true statements about digital audio files?I. An audio file can be created by using samples of one or more existing audio files.II. An audio file can be created by using a computer program to synthesize a new sound.III. An audio file that has gone through lossy compression can be restored to its original uncompressed version.
Q-44: Which of the following is most likely to be part of a phishing attack?
Q-45: Which of the following are true statements regarding the benefits of using e-mail to send messages? I. E-mail can be used to disseminate information to multiple recipients at once. II. E-mail is designed to be a completely secure way of sending confidential information. III. E-mail fosters communication and collaboration between people in distant locations.
Q-46: A student purchases a single-user license of a copyrighted application and wants other students to be able to use it at the same time. Under which of the following conditions is it considered acceptable for the student to share the application?
Q-47: Which of the following are true statements regarding the benefits of using the Internet tocommunicate? I. The Internet provides equal access to information across all socioeconomic groups globally. II. The Internet allows information to be disseminated to many people very quickly. III. The Internet fosters new ways to communicate and collaborate.
Q-48: A bookstore has a database containing information about each book for sale in the store. A sample portion of the database is shown below.A store employee wants to calculate the total amount of money the store will receive if they sellall of the available science fiction books. Which columns in the database can be ignored and still allow the employee to perform this calculation? Select two answers. You have attempted of activities on this page What percent is a 5 on the AP Computer Science Principles exam?The score distribution tables on this page show the percentages of 1s, 2s, 3s, 4s, and 5s for each AP subject.
...
AP Score Distributions.. Is AP Computer Science Principles hard?AP Computer Science Principles is considered very easy, with class alumnae rating it 2.8/10 for overall difficulty (the 28th-most-difficult out of the 28 large AP classes surveyed). The pass rate is about average vs other AP classes, with 67% graduating with a 3 or higher.
How many multipleWhat's on the AP Computer Science Principles Exam?. How is the AP CSP exam score?Earning a 3, 4, or 5 is generally accepted as scoring well on an AP® exam. As reported by the College Board, a 3 is 'qualified,' a 4 'well qualified,' and a 5 'extremely well qualified. ' Depending on the college or university you plan to attend, credits can be awarded for scores within the 3-5 range.
|