
AP CSP Sample Exam Questions - Part 2

Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Eileen Fallon
Used 98+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
13. There are 32 students standing in a classroom. Two different algorithms are given for finding
the average height of the students.
Algorithm A
Step 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 B
Step 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 numbers written on their cards and writes the result on one student’s card; the other student is seated. 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?
(A) Algorithm A always calculates the correct average, but Algorithm B does not.
(B) Algorithm B always calculates the correct average, but Algorithm A does not.
(C) Both Algorithm A and Algorithm B always calculate the correct average.
(D) Neither Algorithm A nor Algorithm B calculates the correct average.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
14. The figure 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 shown. Which of the following code segments will move the robot to the gray square?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
15. Biologists often attach tracking collars to wild animals. For each animal, the following geolocation data is collected at frequent intervals.
▪ The time
▪ The date
▪ The location of the animal
Which of the following questions about a particular animal could NOT be answered using only the data collected from the tracking collars?
(A) Approximately how many miles did the animal travel in one week?
(B) Does the animal travel in groups with other tracked animals?
(C) Do the movement patterns of the animal vary according to the weather?
(D) In what geographic locations does the animal typically travel?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
16. 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?
(A)
IF (IsFound (afternoonList, child))
{
APPEND (lunchList, child)
}
(B)
IF (IsFound (lunchList, child))
{
APPEND (afternoonList, child)
}
(C)
IF (IsFound (morningList, child))
{
APPEND (lunchList, child)
}
(D)
IF ((IsFound (morningList, child)) OR
(IsFound (afternoonList, child)))
{
APPEND (lunchList, child)
}
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
17. Consider the program code shown.
Which of the following best describes the result of running the program code?
(A) The number 0 is displayed.
(B) The number 6 is displayed.
(C) The number 10 is displayed.
(D) Nothing is displayed; the program results in an infinite loop.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
18. Which of the following is a true statement about data compression?
(A) Data compression is only useful for files being transmitted over the Internet.
(B) Regardless of the compression technique used, once a data file is compressed, it cannot be restored to its original state.
(C) Sending a compressed version of a file ensures that the contents of the file cannot be intercepted by an unauthorized user.
(D) There are trade-offs involved in choosing a compression technique for storing and transmitting data.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
19. 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 Boolean variables as shown in the table.
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?
(A) (onFloor1 AND callTo2) AND (onFloor2 AND callTo1)
(B) (onFloor1 AND callTo2) OR (onFloor2 AND callTo1)
(C) (onFloor1 OR callTo2) AND (onFloor2 OR callTo1)
(D) (onFloor1 OR callTo2) OR (onFloor2 OR callTo1)
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
AP CSP MCQ Review Session 3 Quiz

Quiz
•
10th Grade
12 questions
Computer Science

Quiz
•
9th - 12th Grade
10 questions
Technical Terms - Internet (A-Z) - JWT

Quiz
•
12th Grade
10 questions
G10 CS Linear Search

Quiz
•
12th Grade
12 questions
APCSA Unit 7

Quiz
•
9th - 12th Grade
12 questions
Big O Notation Revision

Quiz
•
12th Grade
15 questions
chapter 1(Programming Fundamentals)

Quiz
•
10th Grade
11 questions
GCSE Computer Science Paper 2: Topic 1

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade