Answer to Question #349962 in Python for Arkadeep Kundu

Question #349962

Write a program to find the minimum no of notes required for the amount M.

Available note denominations are 500:50:10:1

The output should be 500: 3 50: 0 10: 4 1:3

The first integer is a single integer M.


1
Expert's answer
2022-06-13T08:27:15-0400
M = int(input())

for note in (500, 50, 10, 1):
    print(f'{note}: {M//note}')
    M %= note

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