For practice use only.
AP CSP Practice Test 2 - Timed Mode
AP CSP Practice Test 2 with a 120-minute timer for AP Computer Science Principles pacing practice.
Time left 120:00
Question 1 of 70
Answered 0 of 70
Choose one answer.
A volunteer app processes the following list. What is displayed?
hours <- [2, 7, 4, 9, 6]
score <- 0
FOR EACH h IN hours
{
IF h MOD 2 = 0
{
score <- score + h / 2
}
ELSE
{
score <- score - 1
}
}
DISPLAY(score)