🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. Why are tests written before the AI writes code more trustworthy?
  2. Q2. What was wrong with splitbillai for ₹100 among 3 people?
  3. Q3. What input type made the AI's max-subarray function wrong?
  4. Q4. What is a brute-force reference used for in randomised testing?
  5. Q5. An AI-written test fails. The AI suggests changing the expected value so it passes. What should you do?
  6. Q6. What does this print? (code)
  7. Q7. Which input belongs in the "boundary" row of an edge-case table for splitting a bill?
  8. Q8. What does this print? (code)
  9. Q9. What do property-based testing libraries such as Hypothesis add to random testing?
  10. Q10. You find a bug in production. What should you do first, according to the lesson?