
AP CSP Sample Exam Questions - Part 2
Authored by Eileen Fallon
Computers
10th - 12th Grade
Used 98+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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)
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
10 questions
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
15 questions
CSS Quarter IV QUIZ 2
Quiz
•
10th Grade
15 questions
# REVIEW 1 DATA TYPES
Quiz
•
10th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
10 questions
Basic Parts of Speech EPS
Quiz
•
9th - 10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
14 questions
[AP CSP] JavaScript Programming Quiz
Quiz
•
9th - 12th Grade
10 questions
Understanding Computers and Computer Engineering
Interactive video
•
7th - 12th Grade
37 questions
Python - Tuples, Lists, and List Methods
Quiz
•
9th - 12th Grade