Courseiva
hardMultiple Choice

FC0-U71 Practice Question: A developer is testing a piece of code that…

A developer is testing a piece of code that calculates discounts. The code should give 10% off for orders over $100, and 5% off for orders between $50 and $100. Which test input set would best verify boundary conditions?

⚠ Common exam trap

The trap here is that candidates often pick Option A or C, thinking that testing the exact boundary values ($50, $100) is sufficient, but they miss the need to test values just outside the boundaries to catch off-by-one or floating-point comparison errors.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

$49.99, $50.00, $99.99, $100.00, $100.01

It tests the exact boundary values for the discount tiers: $49.99 (just below $50, no discount), $50.00 (5% threshold), $99.99 (still 5%), $100.00 (boundary between 5% and 10%), and $100.01 (10% threshold). This set validates both the lower and upper edges of each range, ensuring the code handles floating-point comparisons correctly.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    $50, $100, $150

    Why it's wrong here

    These values test only the exact boundaries, missing just-inside and just-outside cases such as $49.99, $50.01, $100.01 and $99.99, where off-by-one errors surface. It tempts because boundary testing targets limits, but effective boundary sets include values immediately either side of each threshold.

  • ✗

    $0, $50, $100, $200

    Why it's wrong here

    Omits values just below boundaries and uses integer values only, not precise for boundary testing.

  • ✗

    $50.00, $100.00

    Why it's wrong here

    Testing only $50.00 and $100.00 exercises the two thresholds themselves but omits values immediately either side, so an off-by-one error in the `>` and `>=` comparisons stays hidden. Boundary-value analysis pairs each boundary with its neighbours; $49.99, $50.01, $99.99 and $100.01 would expose those faults.

  • ✓

    $49.99, $50.00, $99.99, $100.00, $100.01

    Why this is correct

    These values sit exactly on and just outside each threshold: $50.00 and $100.00 are boundaries, while $49.99, $99.99 and $100.01 test just below and above. This exercises the 5% and 10% discount transitions, satisfying the boundary-condition requirement.

About these practice questions

One of 988 original FC0-U71 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.