kilolilo

Untitled

Oct 25th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. from math import sqrt
  2. def kv(a,b,c):
  3.     d=b*b-4*a*c
  4.     if (d<0):
  5.         print "d<0"
  6.         return 
  7.     x1=(-b+sqrt(d))/(2*a)
  8.     x2=(-b-sqrt(d))/(2*a)
  9.     if (d==0):
  10.         x1=-b/(2*a)
  11.         print x1
  12.     print  x1,x2
  13. kv(2,-2,13)
Add Comment
Please, Sign In to add comment