I'm writing a Python app to automate the quadratic formula (not for any serious work, just for practice) and need to know how to take a number inputted from the user and make it its opposite (i.e, user inputs 15, I need to change it to negative 15). Can't find the solution anywhere from a Google search, though I imagine it's quite simple.
Code:
a = input("Enter a: ")
b = input("Enter b: ")
c = input("Enter c: ")
d = b+b**.5-(4*a*c)/(2*a)
e = b-b**.5-(4*a*c)/(2*a)
print "d=", d
print "e=", e
Basically I need to make the b variable its opposite here.