Posted By

dfornazari on 04/24/15


Tagged


Versions (?)

2-4


 / Published in: Python
 

lista 2 ex 4

  1. __author__ = '9442883'
  2. import math
  3. import time
  4.  
  5. a = float(input("Inserir coeficiente a:"))
  6. b = float(input("Inserir coeficiente b:"))
  7. c = float(input("Inserir coeficiente c:"))
  8. d = b**2 -4*a*c
  9.  
  10. if d<0:
  11. print "Delta menor que zero, impossivel resolver em R"
  12.  
  13. else:
  14. print (-b + sqrt(d))/2*a
  15. print
  16. print (-b - sqrt(d))/2*a

Report this snippet  

You need to login to post a comment.