Free practice · numeric · medium
Practice
Calculate with validated input
After validating quantity = 6 and unit_price = 14, what line total is produced by quantity * unit_price?
Trusted input boundary
Business logic receives only validated, typed values
- PresenceRequired value supplied
- FormatAllowed external form
- ConvertFocused typed conversion
- RangeAllowed business limits
- UsePass checked value to logic
- ReportReturn useful safe failures
Presence, type, format, conversion, and range checks belong at a narrow boundary with useful failures and no hidden fallback.