Chicharronera
public python v1 · immutable#!/usr/bin/env pythonimport mathimport cmatha = float( raw_input('cual es el valor de a: ') )b = float( raw_input('cual es el valor de b: ') )c = float( raw_input('cual es el valor de c: ') )if a==0: print "a no puede ser cero" exit(1)square = b**2-4*a*cif square<0: square = cmath.sqrt(square) else: square = math.sqrt(square)x1 = (-b+square)/2*ax2 = (-b-square)/2*aprint x1print x2