Card Game Gem Affordability and Discount Calculation Functions

Asked at Brex · Coding Questions · Difficulty: Medium

Steve has a card-based board game where players can exchange colored gems. Implement three functions: `can_afford`, `purchase_card`, and `compute_discount`.

Loading the problem…