Exercise 11 · Chapter: FunctionsOptional+50 XP
Coin Quest: The add_coins Function
🪙 Grabbing coins happens everywhere in the game — perfect job for a function.
Define add_coins(coins, amount) that returns coins + amount. Then print add_coins(20, 10) and add_coins(0, 5).
Expected output
30 5
Need a hint?
3 available · costs 5 XP each
python
Output
Run your code to see the output here.