Courseiva
hardMultiple ChoiceObjective-mapped

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

    Omits the boundary between $50 and $100 (e.g., $49.99, $99.99) and does not test $100.01.

  • $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

    Only tests exact boundaries; misses values slightly below and above.

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

    Why this is correct

    This set tests below, at, and above each boundary, ensuring edge cases are covered.

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.