import math # import math module
a=float(input("please input the coefficient of X^2:"))
b=float(input("please input the coefficient of X:"))
c=float(input("please input the constant:"))
print("the equation you are solving is:""(",a,")x^2+(",b,")x+(",c,")")
print("the first solution is:",((-b)+math.sqrt(b*b-4*a*c))/(2*a))
print("the second solution is:",((-b)-math.sqrt(b*b-4*a*c))/(2*a))
拷贝以上代码到 *.py 文件,实验是否能运行。