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

Hey - I finished PS1a with little difficulty, but I'm totally lost with PS1b. I simply don't understand the question. Can someone explain the problem in music-major terms?

OpenStudy (anonymous):

I think a big problem is I can't figure out what "e" is.

OpenStudy (anonymous):

e is a constant like pi. It's just a number that's useful for figuring out certain kinds of problems. it's value is 2.718... You don't need to know what it is or include it specifically in your code in any way--if you use the log function as in math.log(currentPrimeNumber) it will automatically do the part of the calculation that involves e. You do not need to specify e.

OpenStudy (anonymous):

Here's a restatement of the problem that you can use functionally: Find all the primes up to some number which we will call x. That means that if x is 1000, you find all the prime numbers BELOW 1000. It does NOT mean that you find 1000 prime numbers. Add together the logs of those prime numbers. That just means that for each prime, you do the operation math.log(prime) and add the result to the running total. The total of the logs should be close to x. The higher x gets, the closer the sum of the logs should be, generally.

OpenStudy (anonymous):

Okay that makes sense. It seems very similar to the first problem so I should be good from here. Thanks so much!

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!
Latest Questions
rose12345: what are three ways to keep the chicks safe from hawks and weather
22 minutes ago 1 Reply 0 Medals
Rango: any sites to research urban legends?
13 hours ago 9 Replies 1 Medal
Aries: Help Please!
15 hours ago 1 Reply 0 Medals
GhostlyEnigma: Simplify the following expression: 4x + 6y - 3x + 8y - 2x - 5y
16 hours ago 3 Replies 3 Medals
Vixen: Need help on chem ud83eudd74
13 hours ago 8 Replies 3 Medals
Kimberly44: what yall think!!?
14 hours ago 8 Replies 4 Medals
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!