Explain your repair
Optional arithmetic and percentage refresher — return to this activity
Use a failing test and a minimal counterexample to repair a calculation.
A useful test can fail for a plausible wrong implementation. Choose inputs that distinguish multiplication from addition, a one-time fee from a repeated fee, and an empty list from a one-row list. Keep the failing case after the repair: it becomes a regression test. Passing public cases does not demonstrate all-input correctness, and copying a reference implementation does not demonstrate that you can diagnose an unfamiliar failure.
Your saved work
First failure and expected behavior
No response recorded yet. You can write one in the task workspace.
Repair with explanation
No response recorded yet. You can write one in the task workspace.
New counterexample and test result
No response recorded yet. You can write one in the task workspace.
Return to your saved taskYour explanation is retained for your review. It is not automatically graded.
Loading saved work… Backups are available in My Learning.