Answer to Question #279720 in Python for Lovely

Question #279720

The possible denominations of currency notes are 100, 50, 20 and 10. The amount A to be withdrawn is given as input. Write a program to break the amount into minimum number of bank notes.


Input


The first line of input is an integer A


Output


The output should be a string representing number of 100, 50, 20, 10 notes possible.


Explanation


if amor


no


am


9 if amo


18


1
Expert's answer
2021-12-15T02:09:51-0500
nominals = (100, 50, 20, 10)
amount = int(input('amount = '))
output = {}
for n in nominals:
    output[n] = amount //n
    amount %= n
for k, v in output.items():
    print (k,"Notes: ", v)
print()

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS