anonymous
  • 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
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • 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
anonymous
  • 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
anonymous
  • 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

Looking for something else?

Not the answer you are looking for? Search for more explanations.