I am trying to create a program that will work out how long it will take for something to hit the ground when dropped from a particular height and it uses the known quadratic formula. The program appears to be doing what I want of it until it reaches line 7 where there is a math issue I beleive involving sqrt. Can anybody help?
So far I have come up with...
v = float(input())
lowerSum = 2*(-4.9)
upperSum1 = -4*(-4.9)
upperSum2 = (upperSum1)*(11000)
upperSum3 = (v)**2 - (upperSum2)
from math import sqrt
upperSum4 = (v) - sqrt(upperSum3)
t = (upperSum4) / (lowerSum)
print (t)
When I run the program it states that there is a math domain error; I'm new to programming and I do not know what this means.
I am trying to print out the value of t.