RE: [challenge] change calculator 12-22-2015, 04:54 PM
#3
Python:
Wow, your solution is so simple...
Code:
def calc(a):
for i in (100,50,20,10,5,2,1,.25,.10,.05,.01):
b,x=i,0
while b<=a: b,x=b+i,x+1
a-=x*i
print "$"+str(i),"-",x





![[+]](https://sinister.li/images/modern/collapse_collapsed.png)