Facebook
From nie wiiem XD, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 192
  1. import cmath
  2. def quadratic_function(a,b,c):
  3.     d = (b**2) - (4*a*c)
  4.     sol1 = (-b - cmath.sqrt(d))/2*a
  5.     sol2 = (-b + cmath.sqrt(d))/2*a
  6.     print('Solutions {0} and {1}'.format(sol1,sol2))