AP Computer Science Principles Practice Test
Quiz Summary
0 of 18 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
Information
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 must first complete the following:
Results
Results
0 of 18 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- Answered
- Review
-
Question 1 of 18
1. Question
Which of the following best explains how data is typically assembled in packets for transmission over the Internet?
CorrectIncorrect -
Question 2 of 18
2. 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?
CorrectIncorrect -
Question 3 of 18
3. Question
The following grid contains a robot represented as a triangle. The robot is initially facing right.
Which of the following code segments can be used to move the robot to the gray square along the path indicated by the arrows?
CorrectIncorrect -
Question 4 of 18
4. Question
A user purchased a new smart home device with embedded software and connected the device to a home network. The user then registered the device with the manufacturer, setting up an account using a personal e-mail and password. Which of the following explains how a phishing attack could occur against the user of the smart home device?
CorrectIncorrect -
Question 5 of 18
5. Question
Which of the following school policies is most likely to have a positive impact on the digital divide?
CorrectIncorrect -
Question 6 of 18
6. 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 en ough 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))CorrectIncorrect -
Question 7 of 18
7. 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?
CorrectIncorrect -
Question 8 of 18
8. 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 greater than 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?
CorrectIncorrect -
Question 9 of 18
9. 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?
CorrectIncorrect -
Question 10 of 18
10. 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 and geographic location where the photo was taken. For which of the following goals would analyzing the metadata be more appropriate than analyzing the data?
CorrectIncorrect -
Question 11 of 18
11. 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 myList
Line 4: {
Line 5: count 0
Line 6: IF(item = val)
Line 7: {
Line 8: count count + 1
Line 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?
CorrectIncorrect -
Question 12 of 18
12. 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 be executed on a single processor. The following table indicates the amount of time it takes to execute each of three processes on a single processor. Assume that none of the processes are dependent on any of the other processes.
Which of the following best approximates the minimum possible time to execute all three processes when the two processors are run in parallel?
CorrectIncorrect -
Question 13 of 18
13. 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?
CorrectIncorrect -
Question 14 of 18
14. Question
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.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?
CorrectIncorrect -
Question 15 of 18
15. Question
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.Of the following potential benefits, which is LEAST likely to be provided by the upgraded system?
CorrectIncorrect -
Question 16 of 18
16. Question
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.Which of the following is the most likely data privacy concern of the upgraded system?
CorrectIncorrect -
Question 17 of 18
17. Question
Consider the following procedure.
CorrectIncorrect -
Question 18 of 18
18. Question
In the following statement, val1, val2, and result are Boolean variables.
Which of the following code segments produce the same result as the statement above for all possible values of val1 and val2 ?
CorrectIncorrect