Did I approach problem set 2.4 right? my code (http://codepad.org/6vbx5xWn) seems very inefficient. I'm not sure I understood what they were looking for and would appreciate any opinions or alternate approaches.
looks like it should work, i didn't try it. generally that's what most people come up with. i saw one solution that started at 100 and went backwards till it found one that couldn't be bought, which was slick but you had to guess where to start to get it right and sometimes you can't afford to guess seems like you don't need line 32 because of line 38. 17, 20, 23 could be solutionFound = True and then 30 could be "if solutionFound" - actually even using one's and zeroes, line 30 could be "if solutionFound" http://docs.python.org/library/stdtypes.html#truth-value-testing
Join our real-time social learning platform and learn together with your friends!