Ejercicio Raiz.txt

  • Uploaded by: Santiago Ramirez
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ejercicio Raiz.txt as PDF for free.

More details

  • Words: 69
  • Pages: 1
import math print("bienvenidos a nuestro programa") print("conoceremos los valores de la raiz cuadrada") print("digite por favor los coeficientes de un polinomio de grado 2") b=float(input("digite su coeficiente")) a=float(input("digite su coeficiente")) c=float(input("digite su otro coeficiente")) if a==0: print("error no tiene solucion la ecuacion de segundo grado por lo tanto seraun constante") else: if pow(b,b)-4*a*c<0: print("tiene solucion imaginaria") else: x1=(-b+math.sqrt(pow(b,b)-4*a*c))/2*a x2=(-b-math.sqrt(pow(b,b)-4*a*c))/2*a print("la primera solucion es %2.f"%(x1)) print("la segunda solucion es %2.f"%(x2))

Related Documents

Ejercicio
May 2020 47
Ejercicio
May 2020 50
Ejercicio
December 2019 79
Ejercicio
November 2019 84
Ejercicio
November 2019 76
Ejercicio
June 2020 19

More Documents from ""