Added: 2 years ago
From: MIT
Views: 44,835
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (41)

Sign In or Sign Up now to post a comment!
  • well it apears asthough youtube thinks im trying to hack so i cant post the code

  • @MIT i am using 2.7.2 and (as far as i can tell) i copied this exact equation but if i typed in sqrtbi(9, 0.0001) my result was 2.25, then i typed in sqrtbi(25, 0.0001) my result 6.25... can some one examine my copied program and tell me what mistake i have maid?

  • Correction: the babylonians devised the method ascribed here to Newton-Rhapson, although it was only for the particular case of finding square-roots

  • Using Newtonian equation

    a slope of tangent can be shown as dy/dx

    dy is equal to f[x(n] - 0

    dx can be represent as [x(n+1) - x(n)]

    now use the algebra to get the value of x(n+1)

    for more explanation search newton's tangent method in Wikipedia

  • @prithudak1 thank you for trying to explain although honestly I didn't quite understand the use of n. However, as you recommended, Wikipedia did help me solve it! so thanks again :)

  • Does any one know how we get guessi+1 = (guessi-F(guessi))/2*guessi ? Thanks

  • I'll be a genius in programming after I finish watching his lectures.

  • Thumbs up for the Macbook bashing at 26:10.

  • dunno. cuz u want candy?

  • He throws candy.

  • @ILOVEANIMEHOPECARD Guess why I am admitting to MIT? ;)

  • 26:27 best part haha

  • Phew this lecture is a bit harder to wrap my head around. better see it again a few times xD

  • oh my god, thanks to this videos I know I never want to study this, it is f** boring!!

  • @a00225186 It's a class designed for total beginners at programming, it gets more interesting when you get to more advanced topics.

  • the Python stuff kicks back in around 33:00

  • @3djes Thanks

  • @poopeatit

    Ahh I see, thanks for the reply.

  • Should I be worried if some of this is confusing to me? I'm just learning Python for the first time and watching these lectures alongside reading the Python edition of How To Think Like A Computer Scientist - I have lots of knowledge but no way to put stuff together yet.

    I'm also not very good at math and trying to remedy that, so the bisection method section was a bit confusing.

  • @Faffel Have you ever tried using project Euler? It's a great source for beginners to learn some number theory while developing their programming skills (e.g. find all the pythagorean triples between one and ten thousand). The problems get quite challenging if you don't use all of your resources. For many of them, you can adapt an old program to fit the needs of a new problem, developing your editing/optimization skills at the same time.

  • Divide by zero @ 21:45

  • What does he keep throwing at the students?

  • @prodigypc he gives them candy for correct answers, usually misses

  • Is a list the same as an array in other languages, or is there some difference?

  • @ntwiles

    IIRC It's implemented as an array of pointers to the values, that's why it can be heterogeneous; e.g. a python list of [ 1, 42, 'baa', 0.0001] is valid.

    It's similar in use Lisp lists but implemented differently (and actually more efficiently).

    I think it's explained in one of these lectures.

  • newlist = [] print newlist newlist.append('MyUni') newlist.append('YourUni') newlist.append('SomeUni') print newlist print newlist[2] techs = ['MIT','CalTech'] ivys = ['Harvard','Yale','Brown'] unis = [] print techs print ivys print unis unisb = techs + ivys print unisb unis.append(techs) unis.append(ivys) print unis for e in unis: for c in e: print c unisb.remove('Yale') print unisb
  • It's great to learn new things the world is always evolving and new things appear

  • I have to say that this series lectures gave me a different view of programming. It's always a good thing to learn more.

  • Nice lesson. However, the initial algorithm has a critical error when dealing with numbers less than 1. Applying max(x, 1.0) to initial guess is not sufficient to correct the problem because it's necessary to invert the logic when setting high and low variables. Choosing 0.25 for testing the algorithm worked but others numbers less than 1 should fail as that algorithm doesn't converge...

  • @oinocx Nope. sqrt(0.24) is 0.4898... which is less than 0.5 and so on. To make sure I didn't misunderstand you I tested the algorithm with 0.01, 0.02, ... 0.98, 0.99 and it worked nicely.

  • @oinocx @oinocx At first I thought yes you're right, but let me guess why your argument is invalid: You say one has to invert the logic when choosing new lower and upper bounds, but the if condition reads "if guess**2 < x" and because taking the square of a number between 0 and 1 actually makes it smaller, this problem is implicitly taken care of. cheers

  • I should go to MIT, so i can get free candy!

  • How does one use the library of point values for the letters that is defined in the ps5 code they give? I've looked around Python's website, but I can't find anything.

  • The 'incorrect' square root wasn't a precision error, it was a typo. The program printed out that it taking the square root of 123456789 for both of them, but it was actually taking the square root of 1234567890 for the first one.

  • Nice lecture, AND getting more complicated as it goes on! :D

  • Nice lecture, but getting more complicated as it goes on.

  • What languaje is that? C ++ ?

  • Python

  • Comment removed

  • @diegoramos27 It's Python

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more