我写的代码和上面一个思路,没看出哪里语法错误了,报错
import math def quadratic_equation(a, b, c): t = math.sqrt( b * b - 4 * a * c ) return (-b+t)/(2*a),(-b-t)/(2*a) print quadratic_equation(2, 3, 0) print quadratic_equation(1, -6, 5)
返回IndentationError: unexpected indent
import math def quadratic_equation(a, b, c): t = math.sqrt( b * b - 4 * a * c ) return (-b+t)/(2*a),(-b-t)/(2*a) print quadratic_equation(2, 3, 0) print quadratic_equation(1, -6, 5)
返回IndentationError: unexpected indent
2017-12-19
举报