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

Quiz: Testing Python Code · Question 6 of 10

A function gives free delivery for orders of Rs 500 or more. Which set of test inputs is best?

A function gives free delivery for orders of Rs 500 or more. Which set of test inputs is best?

  1. A.100, 1000
  2. B.500 only
  3. C.499, 500, 501, plus 0 and a negative amount
  4. D.1000, 2000, 3000
Answer & explanation

Correct answer: 499, 500, 501, plus 0 and a negative amount

Values just below, at and above the cutoff catch > versus >= mistakes; 0 and negatives check the edges.

Can you get the rest right without peeking?

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

Start the quiz →