Answer to Question #275448 in Python for Preethi

Question #275448

Program to get the count of notes and shows the denomination


1
Expert's answer
2021-12-04T04:24:16-0500
# values of notes
notes = (50, 20, 10, 5, 1)
amount = int(input('amount: '))


for note in notes:
	if amount >= note:
		print(f'{note} : {amount//note}')
		amount %= note
	else:
		print(f'{note} : 0')

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