
AP CSP Practice Test 1 (1)
Authored by Quốc Thư
Computers
7th - 9th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
Consider the following code.
What is displayed because of executing the code segment?
1 3 5 7 9
1 5 7
3 9
9
Answer explanation
2.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
Consider the following code segment.
What is displayed as a result of executing the code segment?
Dog Cat Fish Golden Bandicoot
Dog Cat Fish
Dog Golden Bandicoot Cat Fish
Golden Bandicoot Cat Fish
Answer explanation
petList is initialized containing the value Dog
petList[Dog]
- The value Cat is added to the end of petList
- petList[Dog Cat]
- The value Fish is added to the end of petList
- petList[Dog Cat Fish]
The value Golden Bandicoot is added at position 2 of petList and shifts all values after position 2 to the right.
- petList [Dog Golden Bandicoot Cat Fish]
- The value in position 1 of petList is removed, and all values to the right of position 1 are shifted to the left: petList[Golden Bandicoot Cat Fish]
Each item in petList is displayed, resulting in [Golden Bandicoot Cat Fish].
3.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
Students at a high school receive letter grades based on the following scale:
Scores - Grades letter
I only
III only
I and II only
I, II and III
Answer explanation
4.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
Colors can be represented by decimal values from 0 to 255. If each pixel in a photo is a combination of three color values, what is the minimum number of bits needed to store a single pixel?
512
256
24
8
Answer explanation
Determine the minimum number of bits to hold the number 254:
254 − 128 = 126
126 − 64 = 62
64 − 32 = 30
30 − 16 = 14
14 − 8 = 6
6 − 4 = 2
2 − 2 = 0
11111110
It takes 8 bits to hold the number 255.
Three colors would require 8 bits × 3 = 24 bits.
5.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
Which of the following is a true statement about data transmitted over the internet?
All data traveling over the internet is binary.
Packets are received in the same order that they are sent.
Redundancy in the design of the internet is overseen by large companies that set the standards used.
The domain name system (DNS) has been challenged by the Digital Millennium Copyright Act (DMCA).
Answer explanation
The internet uses fiber-optic cables that transmit data as “on” or “off,” which is represented in binary as 0 or 1.
(B)Due to the fault-tolerant nature of the internet, packets travel in different directions through the internet. Since packets travel in different directions, they arrive at their destination in a different order than that in which they were sent.
(C)There is no central governing body that controls the design of the internet.
(D)The Digital Millennium Copyright Act does not relate to the internet naming convention.
6.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
What will the following code segment display?
1 4 7 10 9
10
9 10 7 4 1
Nothing will be displayed due to the error index out of bounds.
Answer explanation
The procedure is trying to access index 0. The language used on this AP exam starts on index 1. So 0 is out of bounds and will result in an error.
7.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
What should replace <missing condition> so that the program below displays TRUE 60% of the time?
x < 6
x >= 6
x > 10
x £ 10
Answer explanation
There are ten numbers between 5 and 14 inclusive: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14. For the condition to evaluate to true 60% of the time, six of the ten numbers must be included: 5, 6, 7, 8, 9, 10. Since x £ 10 would include six numbers, it would result in being true 60% of the time
(A)x < 6 would include only one number and would result in being true 10% of the time.
(B)x ≥ 6 would include nine numbers and would result in being true 90% of the time.
(C)x > 10 would include four numbers and would result in being true 40% of the time.
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
19 questions
WEB DESIGN QUIZ
Quiz
•
7th - 8th Grade
15 questions
Code.org Lesson 1-14
Quiz
•
9th - 12th Grade
16 questions
Acceptable Use Policy
Quiz
•
6th - 9th Grade
20 questions
Python básico
Quiz
•
9th - 12th Grade
20 questions
Computer
Quiz
•
4th - 7th Grade
20 questions
Google SketchUp Tool
Quiz
•
KG - University
22 questions
Steve Jobs
Quiz
•
6th - 12th Grade
15 questions
Google Tips and Tricks
Quiz
•
7th - 9th 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
60 questions
MOS Word Home, Insert, Reference Ribbon Basics
Quiz
•
9th Grade