Find Total number of currency notes in Python:A cashier has currency notes of denominations 10, 50 and 100. If the amount to be withdrawn is input through the keyboard in hundreds, find the total number of currency notes of each denomination the cashier will have to give to the with drawer.
Find Total number of currency notes in Python
Amount = input("Please Enter Amount for Withdraw :")
print "\n\nRequired notes of 100 is : " , Amount / 100
print "Required notes of 50 is : " , (Amount % 100) / 50
print "Required notes of 10 is : " , (((Amount % 100) % 50) / 10)
print "Amount still remaining is : " , (((Amount % 100) % 50) % 10)
Output :
Please Enter Amount for Withdraw : 1275
Required notes of 100 is : 12
Required notes of 50 is : 1
Required notes of 10 is : 2
Amount still remaining is : 5