import math a = float(raw_input('input a:')) b = float(raw_input('input b:')) c = float(raw_input('input c:')) if a != 0: delta = b ** 2 - 4 * a * c; if delta < 0: print 'No solution' elif delta == 0: s = -b / (2 * a); print 'Solution is', s else: root = math.sqrt(delta) s1 = (-b + root) / (2 * a) s2 = (-b - root) / (2 * a) print 'Solutions are', s1, s2