Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 16 Online
OpenStudy (anonymous):

Hi ... I'm new to programming and I'm having some problems with PS2 problem 3. Could someone have a look at my code and give me some pointers? Here is my code: http://codepad.org/C1BVgWkE

OpenStudy (anonymous):

your while loop at line 3 will run as long as m is less than 50 but you never change m so it will run forever. will 3 breaks (lines 12, 13, 14) work like that - for some reason i don't think it is doing what you want

OpenStudy (anonymous):

Thanks for the advice. I have changed it so that m increases. I think it is better now. Could you tell me what you think? http://codepad.org/YxnsSebt

OpenStudy (anonymous):

Line 24 of your output saya that 46 cannot be bought but two-twenties and a six would be 46 so your logic is wrong somewhere or maybe the limits in your range functions are wrong http://docs.python.org/library/functions.html#range sometimes it helps to put print statements in to see what is happening http://codepad.org/YyOpDiGl

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!