For practice use only.
AP CSP Practice Test 2 - Practice Mode
AP CSP Practice Test 2 in practice mode with per-question answer checks and explanations.
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)