# # Determine how many roots there are for an equation of the form # ax^2 + bx + c = 0. # # Determine the number of roots for a quadratic equation. def numRoots(a, b, c): # Compute the discriminant disc = b*b - 4*a*c # Determine the number of roots from the discriminant. if disc < 0: roots = 0 elif disc == 0: roots = 1 else: roots = 2 # Return the number of roots. return roots # Read the values of a, b and c from the user. a = float(input("Enter the value for a: ")) b = float(input("Enter the value for b: ")) c = float(input("Enter the value for c: ")) # Identify the number of roots. roots = numRoots(a, b, c) # Display the number of roots. print("The number of real roots for that equation is", roots)