anonymous
  • anonymous
Without giving a full answer, can anyone give me an expected result of pset2 problem 3
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
you want the number but not the code?
anonymous
  • anonymous
lol@bwCA
anonymous
  • anonymous
Ok, scratch that i know i screwed up somewhere. Any Advice: #11:53 3/9/12 #McNugget Diophantine #MIT - OCW CIS 6.00 PSET2a bestsofar = 0 def mng (mcnuggets): ##mng = mcnuggetgrinder Pkg3 = 20 Pkg2 = 9 Pkg1 = 6 for numPkg3 in range (0, mcnuggets + 1, Pkg3): for numPkg2 in range (0, (mcnuggets + 1) - (numPkg3 * Pkg3), Pkg2): numPkg1x = mcnuggets - (numPkg3 * Pkg3) - (numPkg2 * Pkg2) if numPkg1x % 6 == 0: return True for n in range (1, 150): ## n = nuggets if mng(n) != True: if n > bestsofar: bestsofar = n print "Largest number of McNuggets that cannot be bought in exact quantity:", bestsofar

Looking for something else?

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

More answers

anonymous
  • anonymous
pls use a code pasting site: dpaste.com, pastebin.com, codepad.org, are a few - they all have syntax highlighting and the last will execute your script. your function needs to return False also, if appropriate if you have an expression that evaluates to a boolean, don't compare it to True or False in an if statement - just use it as is - http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#testing-for-truth-values http://pastebin.com/PMD4kmtf
anonymous
  • anonymous
I answered your question on the given link! The number is 149... http://codepad.org/2ploRkxf
anonymous
  • anonymous
149 is not the answer

Looking for something else?

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