-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Thomas C edited this page Jun 27, 2016
·
1 revision
Welcome to the Boston-University-Matrix wiki!
import cmath
a = float(input('Enter a: ')) b = float(input('Enter b: ')) c = float(input('Enter c: '))
d = (b**2) - (4ac)
sol1 = (-b-cmath.sqrt(d))/(2a) sol2 = (-b+cmath.sqrt(d))/(2a)
print('The solution are {0} and {1}'.format(sol1,sol2))