6.00 Fall 2008 In problem set 1a (ps1a), should I just print the prime number or print all the steps of the generate-and-test method? Also, in Ps1b, I really don't understand the math behind it ...I googled it and found out what a log is (don't mock..I'm 'very' young..I think I'll study (log) next year at school) What does the "e" represent in "e**n" ?? Much help needed :D Third and Final question, should I switch to 6.00 spring 2011?? Thanks in advance :)
1. imprimes todos hasta el numero n que escribas: example n=7 prime(n)= 2,3,5,7 2. if is_prime(n) cont=cont+log(n) cont is a accumulator log is the exponent to which the base must be raised to obtain the number \[3^{2}=9 \rightarrow \log_{3} 9=2 \]
e is the base for natural logarithms natural logs turn up frequently in calcs for real world phenomena http://en.wikipedia.org/wiki/E_(mathematical_constant) http://en.wikipedia.org/wiki/Natural_logarithm i took the 2008 course b4 the 2011 course was offered. when i look at the psets for the 2011 course, they look very similar except they seem to be in a different order. i learned a lot in the 2008 course
@NanZY you can use the function `log()` (return a log of a number) without knowing what it is. But remember add `from math import *` at the beginning of your code, so you'll be able to use it later Good luck
import math math.log(x)
Thank you for caring to answer :) I'm still trying to figure it out x( A bit disappointed though... never thought it would be that hard... :) Thanks again ;)
No seriously :D I still need help Are there any solutions for the assignments?
not for the 2008 class - but you can ask here for solutions or even search the web for mit ocw 6.00 solutions
Thank you all :)
Join our real-time social learning platform and learn together with your friends!