MIT 6.0001 Intro to Comp Sci and Programming in Python 3
MIT 6.0001 Intro to Comp Sci and Programming in Python 3
1. Robot Cheerleaders:
2. Toolbox Expansion:
Added knowledge:
Integers, floats, booleans.
String manipulation.
Math operations.
Conditionals and branching.
Loops: for and while.
3. Algorithms:
5. Approximate Solutions:
6. Bisection Search:
A more efficient method than guess and check.
Divide the search space in half with each guess.
Choose a guess halfway between the current high and low boundaries.
Adjust boundaries based on whether the guess is too high or too low.
Continue until the guess is within an acceptable range (epsilon).
Converges on the order of log base n, making it powerful for large search spaces.
7. Practical Demonstration:
The bisection search code shown only works for positive cubes.
For numbers less than 1, the cube root will be outside the initial boundary.
A small adjustment can be made to the code to account for this.
Conclusion: