The error_term_formula equation should be corrected to the following: # TODO: Write the error term formula def error_term_formula(y, output): return (y - output) See below link for explanation: https://knowledge.udacity.com/questions/649332