← 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?
- A.100, 1000
- B.500 only
- C.499, 500, 501, plus 0 and a negative amount
- 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 →