• anonymous
This is for problem set 1 of the course where one needs to generate primes. I created a list of Odds and now want to go through that list to generate the primes. I'm a bit stumped on that. I know to divide the number with previous numbers in the list but am stuck on syntax. x=100oddList = ()for i in range(1,x): if (i%2) == 1: oddList = oddList + (i, )print oddListprimeList = ()for in in oddList: if (i%(i-1))==0: primeList = primeList + (i,)
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.

Looking for something else?

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