A community for students. Sign up today!
Here's the question you clicked on:
 0 viewing

This Question is Open

osanseviero
 9 months ago
Best ResponseYou've already chosen the best response.2Ok, let's think we have to find a value in the range 1 to 1 million

osanseviero
 9 months ago
Best ResponseYou've already chosen the best response.2I am going to try that you answer yourself

osanseviero
 9 months ago
Best ResponseYou've already chosen the best response.2So...how would you try to find this value?

mattyfar
 9 months ago
Best ResponseYou've already chosen the best response.0i know its where you guess half way and then see if the answer is lower or higher. I'm just now super clear on how to set it up in python

osanseviero
 9 months ago
Best ResponseYou've already chosen the best response.2You should write a psudo code first x is the value you are searching a is the max range b is the min range c is (a+b)/2 > midpoint if x>c: the min range will be c now. else: the max range will be c now Something like that :) try working around it

seandisanti
 9 months ago
Best ResponseYou've already chosen the best response.0Don't forget an epsilon value, or you may end up in an infinite loop.

UnkleRhaukus
 9 months ago
Best ResponseYou've already chosen the best response.0sounds like binary search

ricketybridge
 9 months ago
Best ResponseYou've already chosen the best response.0Are you referring specifically to Newton's method? Because that actually has a rather complicated proof to explain why it converges on the square root. For just how to implement it in Python, review the code from Prof. Guttag's examples: http://ocw.mit.edu/courses/electricalengineeringandcomputerscience/600scintroductiontocomputerscienceandprogrammingspring2011/unit1/lecture3problemsolving/MIT6_00SCS11_lec03.pdf

lopus
 9 months ago
Best ResponseYou've already chosen the best response.0this video can help you: https://www.youtube.com/watch?v=nJ74bEBUEw
Ask your own question
Ask a QuestionFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.