AP Computer Science Principles (CSP) Practice Test 2022: College Board’s Advanced Placement® Program (AP®) Computer Science Principles (CSP) exam question answers for free. You can download a printable PDF for AP exam test prep.
Each of the questions or incomplete statements below is followed by four suggested answers or completions. Select the one that is best in each case and fill in the appropriate letter in the corresponding space on the answer sheet.
AP Computer Science Principles (CSP) Practice Test
Test Name | AP Computer Science Principles |
Test Type | CBT |
Total Questions | 35 |
Type of question | sample |
Time limit | N/A |
Answers | Available |
Printable PDF | upload soon |
Test Authority | The College Board |
Quiz-summary
0 of 35 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
Information
r College Board’s Advanced Placement® Program (AP®)
Computer Science Principles (CSP)
AP CSP Exam Practice Test 2
Total Questions: 35
Time Limit: 45 Minutes
Click on the “StartQuiz” Button to start the test
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 35 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- Answered
- Review
-
Question 1 of 35
1. Question
1 pointsWhat is displayed after running the following algorithm?
-
Question 2 of 35
2. Question
1 pointsWhat is displayed after running the following algorithm?
-
Question 3 of 35
3. Question
1 pointsWhat is displayed after running the following algorithm?
-
Question 4 of 35
4. Question
1 pointsIn a computer, text is represented by numbers, which are converted into characters using an encoding standard. Two common examples are the American Standard Code for Information Interchange (ASCII) and Extended Binary Coded Decimal Interchange Code (EBCDIC), which correspond the same character to different numbers. A sample of the encoding standards is provided below.
Convert the hexadecimal array {50, 4F, 4B, 4C} to a list of ASCII characters and a list of EBCDIC characters.
-
Question 5 of 35
5. Question
1 pointsUsing the table converts the ASCII character “M” to a binary number.
-
Question 6 of 35
6. Question
1 pointsWhat will the following program display?
-
Question 7 of 35
7. Question
1 pointsErrors in Microsoft Windows are often displayed with hexadecimal error codes. If this number is converted into a decimal, it can be used by certain utilities to diagnose the problem with the computer.
If a stop error (i.e., a “Blue Screen of Death”) returns the error code 0x0000008F, what is the error? (Ignore the “0x” at the start; this is a signal that the number is in hexadecimal.)
-
Question 8 of 35
8. Question
1 pointsHow is a string stored in a computer’s memory?
-
Question 9 of 35
9. Question
1 pointsA programmer is proposing to have her debugging program report errors in hexadecimal numbers rather than decimal numbers. Which of the following is a good reason for doing so?
-
Question 10 of 35
10. Question
1 pointsA programmer is planning to make a program that allows a company to organize its employees by name, ID number, and salary. Suppose the programmer is making an abstraction called newEntry that takes in this data to create a new entry.
Which of the following would be a good header for the abstraction?
-
Question 11 of 35
11. Question
1 pointsWhy is it best to use an iterative and incremental process of program development?
-
Question 12 of 35
12. Question
1 pointsHow many times does the inner loop iterate in the following?
REPEAT x TIMES
{
REPEAT y TIMES
{
<Program statement>
}} -
Question 13 of 35
13. Question
1 pointsThe figure below uses a robot in a grid of squares. The robot is represented as an arrow, which is initially in the bottom-right square of the grid and facing toward the right of the grid. Which of the following algorithms will place the robot in the gray square?
A. ROTATE_LEFT()
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()
ROTATE_LEFT()
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()B. ROTATE_LEFT()
REPEAT 4 TIMES
{
MOVE_FORWARD()
}
ROTATE_LEFT()
REPEAT 4 TIMES
{
MOVE_FORWARD()
}C. ROTATE_LEFT()
REPEAT 4 TIMES
{
MOVE_FORWARD()
}
ROTATE_LEFT()
ROTATE_LEFT()
REPEAT 4 TIMES
{
MOVE_FORWARD()
}D. REPEAT 4 TIMES
{
MOVE_FORWARD()
}
ROTATE_LEFT()
REPEAT 4 TIMES
{
MOVE_FORWARD()
}a
-
Question 14 of 35
14. Question
1 pointsWhat percentage of the time will the following program display an even number?
DISPLAY(RANDOM(1,10))
-
Question 15 of 35
15. Question
1 pointsWhere is cloud data stored?
-
Question 16 of 35
16. Question
1 pointsIn general, which of the following is NOT an advantage of using computer simulations? Select two answers.
-
Question 17 of 35
17. Question
1 pointsWhich of the following describes a lossy transformation of digital data?
I. Compressing an image file into a smaller resolution image so the image can easily be emailed
II. Inverting the colors of an image by subtracting each RGB value from 255
III. Converting an image by averaging its RGB values and assigning the new value to a shade of gray ranging from white to black -
Question 18 of 35
18. Question
1 pointsWhich of the expressions are equivalent to the Boolean expression NOT (num < 13)?
-
Question 19 of 35
19. Question
1 pointsThe following are steps data takes as it travels across the internet.
I. Data is chopped into chunks called packets.
II. Packets are reassembled into a coherent message.
III. Packets are routed throughout the internet.
IV. Packets go through internet service providers (ISPs) to access the internet.Which of the following is the correct path data takes when it travels from one device to another device through the internet?
-
Question 20 of 35
20. Question
1 pointsAn algorithm has n number of steps. Which of the following would NOT be considered a reasonable number of steps?
100 n4
-
Question 21 of 35
21. Question
1 pointsA student was unable to connect to a website by entering its URL into her web browser. However, she successfully accessed the website by entering its IP address. Which of the following systems was most likely the one that failed when trying to access the website?
-
Question 22 of 35
22. Question
1 pointsWhich of the following are benefits to having information be easy to access?
I. Information can be easily found by researchers, which can improve experimental and investigational findings.
II. Information can be easily found by students, who can use it to improve their understanding of a topic.
III. Information can be easily checked by third parties, which ensures that it is always correct and up-to-date. -
Question 23 of 35
23. Question
1 pointsMost coding languages enable programmers to include a source file in the form of abstractions. For example, in C++, the command #include <iostream> grants the program access to basic input/output commands. Why would such a feature be useful in a language?
-
Question 24 of 35
24. Question
1 pointsWhy would a heuristic analysis be useful in an antivirus program?
-
Question 25 of 35
25. Question
1 points“Boids” is a flocking algorithm that is used to determine the direction of objects in a moving population. It is built on three principles: Select two answers.
I. Separation: steer to keep local flock mates at a certain distance
II. Alignment: steer toward the average heading
III. Cohesion: steer toward the center of the flockSuppose that a programmer is creating a method called findBoidHeading that
calculates the heading of an individual boid in the flock. findBoidHeading
takes in a data structure of the other boids in the program.The following commands are used on Boid objects. Assume that the name is
representative of the function. Which might be useful in findBoidHeading? -
Question 26 of 35
26. Question
1 pointsA simulation for a coin flip should result in 50% heads and 50% tails. Select two answers that could replace the missing condition. Select two answers.
-
Question 27 of 35
27. Question
1 pointsA program for children is designed to display a math problem and let the user input what he or she believes to be the answer. What data transformations are undergone at the most basic level of the program?
Select two answers.
-
Question 28 of 35
28. Question
1 pointsWhy is it more effective to use abstractions in a program than to repeat code? Select two answers.
-
Question 29 of 35
29. Question
1 pointsWhich of the following is NOT possible using the RANDOM(a, b) and DISPLAY(expression) abstractions?
Select two answers.
DISPLAY (RANDOM(1, 4) + RANDOM(2, 5))
-
Question 30 of 35
30. Question
1 pointsThe algorithm below displays TRUE 60% of the time.
What is the missing condition? Select two answers.
-
Question 31 of 35
31. Question
1 pointsWhich of the following are examples of collaborations that have been created through crowdsourcing? Select two answers.
-
Question 32 of 35
32. Question
1 pointsConvert 100001BIN to a decimal number
-
Question 33 of 35
33. Question
1 pointsConvert 2DHEX to a decimal number
-
Question 34 of 35
34. Question
1 pointsOrder the numbers from lowest to highest.
I. 12HEX
II. 12DEC
III. 12OCT -
Question 35 of 35
35. Question
1 pointsOrder the numbers from highest to lowest.
I. AAHEX
II. 99DEC
III. 1111BIN
See also
- AP CSP Exam 2022 Study Guide with Practice Test [UPDATED]
AP CSP Practice Test Questions Answers [PDF] - AP Computer Science Principles (CSP) Practice Test
- AP Computer Science Practice Test (Questions Answers)