Answer to Question #220933 in Python for Hari nadh babu

Question #220933

Denominations - 4

Write a Python program of Denominations - 4. It consists of two test cases


The below link contains Denominations - 4 - Question, explanation and test cases


https://drive.google.com/file/d/1V_Mddi69HHGThW1V4Y04zgHkes46CIJF/view?usp=sharing


We need all test caese can be come while code was running

1
Expert's answer
2021-07-31T07:17:12-0400
M = int(input())
print('2000:', M//2000, sep='', end=' ')
M -= M//2000 * 2000
print('500:', M//500, sep='', end=' ')
M -= M//500 * 500
print('200:', M//200, sep='', end=' ')
M -= M//200 * 200
print('50:', M//50, sep='', end=' ')
M -= M//50 * 50
print('20:', M//20, sep='', end=' ')
M -= M//20 * 20
print('5:', M//5, sep='', end=' ')
M -= M//5 * 5
print('2:', M//2, sep='', end=' ')
M -= M//2 * 2
print('1:', M, 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