🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Testing AI Code: all 10 questions

Quiz: Testing AI Code · Question 2 of 10

What was wrong with splitbillai for ₹100 among 3 people?

What was wrong with split_bill_ai for ₹100 among 3 people?

  1. A.It returned 4 shares
  2. B.The shares didn't add up to the total — paise were lost
  3. C.It raised ValueError
  4. D.It returned negative numbers
Answer & explanation

Correct answer: The shares didn't add up to the total — paise were lost

10000 // 3 = 3333, and 3 × 3333 = 9999, losing 1 paisa.

Can you get the rest right without peeking?

Take the timed Quiz: Testing AI Code quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →