Skip to content
Code ReadingFewest Coins
Break the Code

Fewest Coins

Write an amount (a whole number from 1 to 60) for which this function gives the wrong answer.
1def fewest_coins(amount):
2 coins = 0
3 for coin in (4, 3, 1):
4 coins += amount // coin
5 amount = amount % coin
6 return coins