← Quiz: How AI Coding Assistants Work: all 10 questions
Quiz: How AI Coding Assistants Work · Question 4 of 10
What did averagemarks([]) do in the demo?
What did average_marks([]) do in the demo?
- A.Returned 0
- B.Returned None
- C.Raised ZeroDivisionError
- D.Returned an empty list
Answer & explanation
Correct answer: Raised ZeroDivisionError
sum([]) / len([]) divides by zero. The empty-list behaviour was never specified.
Can you get the rest right without peeking?
Take the timed Quiz: How AI Coding Assistants Work quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →