1 Read question2 Draft response3 Review notes
Stripe · Coding
Currency Exchange Rate Converter
Must priorityMedium
The questionBuild a currency exchange system for a global payments platform with rate lookups and conversions
Executable browser contract: Implement tiered_cost(units, tiers). tiers is an ordered list of (inclusive_upper_bound, price_per_unit), with the final bound optionally None. Prices apply incrementally. Return a float and reject negative units, non-increasing bounds, or insufficient tiers.
Try a first passNo account required. Nothing you type here is sent or saved.
Ready to work it, not just read it?Create an anonymous workspace to open the right editor, save your attempt, and track this question.
Practice this question free →