 <p><code>final_3root</code> is missing a return statement. </p> <p>Look closely at the error. <code>x</code> is <code>None</code>. If you trace it back, you'll see that the return value of that function is used, but it never returns anything. </p>