Baba wrote: > def can_buy(n_nuggets): [snip] > can_buy(55) > > as you can see i am trying to loop through all combinations of values > bewtween 1 and n_nuggets and when the equation resolves it should > return True, else it should return False. > > I was hoping that when i then call my function and ask it to test a > value nothing happens. What is wrong? My syntax? My semantic? Both?
You're calling the function, but you're not doing anything with the result. If you use "print can_buy(55)" you'll see the result on the console. Presumably you'll actually want to use it in an if statement. -- Brian -- http://mail.python.org/mailman/listinfo/python-list