to findintercept local "guess ; Variable storing user's guess at intercept. local "betterguess ; Variable storing computer's guess at intercept. ; Display the function. print [For the function shown below:] print [] printout "function ; Prompt user for a guess at the intercept. type [Enter a guess at an x-intercept: ] make "guess readword print[] ; Use improve_guess procecdure several times to apply Newton's method. make "betterguess improve_guess improve_guess improve_guess :guess ; Display the improved guess. print sentence [I have used Newton's method to improve this guess to] ~ word :betterguess ". ; Give the user information on how close this is to an intercept. print [] print (sentence [The value of the function at] :guess [is] ~ word (function :guess) ". ) print (sentence [The value of the function at] :betterguess [is] ~ word (function :betterguess) ". ) end to function :value output :value * :value * :value - 8 end to improve_guess :guess output :guess - (function :guess) / (slope :guess) end to slope :value output 3 * :value * :value end