def changeCoin():
mess = raw_input("Enter in the amount to change coin? ")
amt = float(mess)
q = int(amt / .25)
rmd = amt - (q * .25)
d = int(rmd / .10)
rmd = amt - ((d*.1)+(q*.25))
n = int(rmd / .05)
rmd = amt - ((n*.05) + (d*.1) + (q*.25))
p = int(rmd / .01)
print q, d, n, p
No comments:
Post a Comment