Answer to Question #297613 in Python for can i get code for

Question #297613

code for denominations 100, 50,10,1


1
Expert's answer
2022-02-14T07:54:51-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS