Exam-style question
Try this first
What is printed by this Python code?.
- A.0
- B.1
- C.2
- D.3
Model answer
What a good answer should say
- 3
Explanation
Why this works
The values are at indices 0 through 3. The target value 4 is the final item, so the search prints index 3 and stops.
Common mistake
No common mistake is linked to this question yet.
