← All topics
Quiz: Reviewing AI Code: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What did the second call addscore(75) return in Bug 1?
- Q2. What is the right type for storing rupee amounts?
- Q3. In Bug 4, was the contest really still open at 4 PM UTC?
- Q4. Why is except Exception: return 0 dangerous?
- Q5. Which change fixes the slow duplicate check in Bug 6?
- Q6. What does this print? (code)
- Q7. An AI's pagination function returns items 21–40 for page 1 when pages start at 1. What kind of bug is this?
- Q8. What does this print? (code)
- Q9. In getdiscount, what should replace except Exception: return 0?
- Q10. Why does the lesson say to review "the diff, not the chat"?