How does sliding down a tangent line beat halving at finding a square root — and why does it lead straight to functions?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Finding the square root of k means finding a root of f(x) = x**2 - k. To take a Newton step we first need f evaluated at the current guess. For k = 24 and a guess of 12, compute f(guess) and assign it to f_value.
(Hint: ** raises a number to a power.)