AP Computer Science Principles Quiz
19 questions · no time limit
0:00
ALGORITHMS AND PROGRAMMING
Question 1 of 19
No time limit
Current
Answered
Flagged
Not seen
Shopping cart scenario: Refer to the pseudocode. What is the value of variable total after executing the code?
1. total ← 0 // running total
2. price ← 15 // item price
3. quantity ← 1 // first quantity
4. total ← total + price * quantity // add first item
5. price ← 10 // new item price
6. total ← total + price * 2 // add two of second item
YOUR PROGRESS
19
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F
Answers save as you go · flagged questions come back at the end