← All topics
Quiz: Testing AI Code: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Why are tests written before the AI writes code more trustworthy?
- Q2. What was wrong with splitbillai for ₹100 among 3 people?
- Q3. What input type made the AI's max-subarray function wrong?
- Q4. What is a brute-force reference used for in randomised testing?
- Q5. An AI-written test fails. The AI suggests changing the expected value so it passes. What should you do?
- Q6. What does this print? (code)
- Q7. Which input belongs in the "boundary" row of an edge-case table for splitting a bill?
- Q8. What does this print? (code)
- Q9. What do property-based testing libraries such as Hypothesis add to random testing?
- Q10. You find a bug in production. What should you do first, according to the lesson?