Exercise 11 · Chapter: Linear ProgramsOptional+50 XP
Coin Quest: The Coin Shop
🪙 The shop is open! A coin pack costs 4 dollars, and you're buying 3 packs with 20 dollars in your pocket.
- Create
packswith3 - Compute
priceas4 * packs - Compute
moneyas20 - price - Print the receipt with an f-string:
You bought 3 packs for 12 dollars - Print
moneyon its own line
Expected output
You bought 3 packs for 12 dollars 8
Need a hint?
3 available · costs 5 XP each
python
Output
Run your code to see the output here.