I'm getting type error and I'm not sure why. Please help me correct this : (https://i.stack.imgur.com/00ckA.png)
Python 2.5
Not sure what's going wrong. I've tried this a million different ways and I am so confused. Please be nice as I'm a bit of a beginner at Python.



    import math

    quad_function = "(a * x^2) + b * x + c"
    print "A quadratic function is:" + quad_function

    a_input = raw_input("Is 'a' given?")
    b_input = raw_input("Is 'b' given?")
    c_input = raw_input("Is 'c' given?")
    x_input = raw_input("Are any of the solutions         given?")

    if a_input == "yes":
        a = int(raw_input("What is 'a'?"))
    if b_input == "yes":
        b = int(raw_input("What is 'b'?"))
    if c_input == "yes":
        c = int(raw_input("What is 'c'?"))
    if x_input == "one":
        x_1 = int(raw_input("What is the first     solution?"))
    if x_input == "both":
        x_1 = int(raw_input("What is the first solution"))
    x_2 = int(raw_input("What is the second solution"))

    print 'The quadratic function is:' + str(a) + 'x^2'     + '+' + str(b) + 'x' + "+" + str(c)

    d = b ** 2 - 4*a*c
    if d > 1:
        num_roots = 2
    if d == 1:
        num_roots = 1
    if d < 1:
        num_roots = 0
    print "There are " + str(num_roots) + " roots"

    if x_input == "no" and d > 2 and a_input == 'yes' and b_input == 'yes' and c_input == 'yes':
    x1 = float(((-b) + math.sqrt(d))/(2*a))
    x2 = float(((-b) - math.sqrt(d))/(2*a))
    print "The two solutions are: " + str(x1) * "and " + str(x2)