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

So I have a question about PS#1 Problem 2. Below is my code. What I can't figure out is how to sum up the logs of the primes. I could put them in a tuple or a list, but then I don't know how to get them back to sum them up. I'm thinking there must be an easier solution. Any guidance would be appreciated. http://dpaste.com/500766/

OpenStudy (anonymous):

Rather than saying that logprime = log(testnum) why not say logprime = logprime + log(testnum)

OpenStudy (anonymous):

hehe. yep. as soon as I posted this, I realized how to fix it. See http://dpaste.com/500812/ Thanks again polpak.

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!
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!