PCEP Control Flow, Loops, Lists and Logic • Set 4
PCEP Control Flow, Loops, Lists and Logic Practice Test 4 — 15 questions with explanations. Free, no signup.
A quality engineer stores measurement readings in the list `readings`. A sentinel value of `-1` marks the end of valid data, but later entries may still exist in the list. The engineer needs to total only the values before the first `-1`. Which code fragment produces the correct total in `total`?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.