Question DSA-GRDY-0038
EasyWhat is the output of this code?
coins = [10, 5, 2, 1]
amount = 18
count = 0
for c in coins:
count += amount // c
amount %= c
print(count)
- A.
18
- B.
3
- C.
Sign up free to see the answer and a step-by-step explanation.