banknotes = [200,100,50,20,10,5,1,0.50,0.25,0.10,0.05,0.01]
amount = float(input("Enter an amount: "))
for i in range (0,len(banknotes)):
if banknotes[i] <= amount:
banknote = int(amount // banknotes[i])
amount = amount - banknote*(banknotes[i])
print(banknotes[i],"banknotes:",banknote)
For example when I input 86.74, program acts like its 86.73. But somehow when I input 386.74 or almost any other number, it works correctly. I really can't see where the problem is, and I tried online python compiler to see if my IDE is bugged, same thing happened.