anonymous
  • anonymous
I was wondering if anyone can check my solution to ps2 problem (McNuggets) I have been trying to get this optimized but am not sure I am handling it the right way. I am sure the output is correct so the program is working. http://pastebin.com/UbMe0MPj
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.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
same thing but different - with for loops http://dpaste.com/696595/
anonymous
  • anonymous
here is my solution to the finding prime number problem the only bug is it goes to -1 but im satisfied def prime(x, z): assert x> 0 assert z>= 0 while x > z: x = x-1 while x == 2 or x == 3 or x == 5 or x == 7 or x == 0: print x, 'is prime' x = x-1 if x%2==0 or x%3== 0 or x%5==0 or x%7==0: print x, 'is not prime' else: print x, 'is prime' if x is 0: print None return None
anonymous
  • anonymous
here is my solution
1 Attachment

Looking for something else?

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