← 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?
- A.It returned 4 shares
- B.The shares didn't add up to the total — paise were lost
- C.It raised ValueError
- 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 →