
AP CSP Unit 5, Quiz 4 Review
Authored by Kammas Kersch
Computers
10th - 12th Grade
Used 119+ 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
45 sec • 1 pt
After running the following code segment, what is contained in the array data?
[3, 1, 8, 4, 4]
[2, 3, 4, 5, 6]
[2, 3, 4, 5, 4]
[3, 1, 8, 4 null]
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many times will this loop iterate?
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is not an action a programmer should take when debugging a segment of code?
Display the value of variables at various points during the program
Ask a friend or collaborator to look over the code segment to see if they are able to find any errors
Delete all the code and re-type it
Check the names of each variable for spelling and capitalization errors
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
You are writing a reply function for a text messaging app. You want to swap the sender and receiver so that the value currently in From ends up as the value in To and To ends up in From. Which code segments will correctly swap the values?
to = from
from = to
from = var temp
to = temp
from = to
var temp = from
from = to
to = from
var temp = from
from = to
to = temp
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Any sequence of characters between quotation marks
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Use the following code segment to answer this question.
What would be the output of the equation procedure when a is 9, b is 10, and c is 4?
18
72
-72
360
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?