Question #297613

code for denominations 100, 50,10,1


Expert's answer

nominals = (100, 50, 10, 1)
amount = int(input('amount = '))
output = {}
for n in nominals:
   output[n] = amount // n
   amount %= n
for k, v in output.items():
   print(k, v, sep=':')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS