#!/usr/bin/python3 # m1e07b.py from math import sqrt a = float( input("Introdueix els coeficient a: ") ) b = float( input("Introdueix els coeficient b: ") ) c = float( input("Introdueix els coeficient c: ") ) disc=b*b-4*a*c; x1=(-b+sqrt(disc))/(2*a); x2=(-b-sqrt(disc))/(2*a); print("x1: %.4lf, x2: %.4lf"%(x1,x2))