
Lists, Loops, & Traversals Quiz | AP CSP
Authored by Isidore Hernandez
Computers
9th - 12th Grade
Used 28+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
The code segment has three missing values: <COUNTER>, <AMOUNT>, and <STEP>. What must be the missing values to display 7 8 8 9?
<COUNTER> = 1,
<AMOUNT> = 2,
<STEP> = 1
<COUNTER> = 1,
<AMOUNT> = 7,
<STEP> = 1
<COUNTER> = 7,
<AMOUNT> = 2,
<STEP> = 1
<COUNTER> = 7,
<AMOUNT> = 4,
<STEP> = 1
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of these code segments is an example of an infinite loop when x = 10 and y = 5?
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of the following line of code replace <INSERT CODE> to display all the items inside of list?
i < list[list.length]
i < list.length
i <= list[0]
i < list.length - 1
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will be displayed to the console when the following program runs?
0 2 4 6 8 10
2 4 6 8
0 2 4 6 8
2 4 6 8 10
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will be displayed in the console after this program runs?
[9, 32, 39]
[8, 9, 32, 39]
[8, 32, 37, 39]
[8, 32, 37]
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will be the value of sum after this code runs?
21
6
7
15
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of the following code segments prints out "hello" 10 times to the console?
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?