I trying to write code to show how high a ball would go up from the calculation
however no matter how I type it, it keeps saying that it "cannot convert string to float" on the height varible
time = input("How long did the ball go up? in seconds\n")
time = float(time)
velocity = input("What was the initial velocity?\n")
velocity = float(velocity)
height = ("What was the initial height?\n")
height = float(height)
answer = (time ** 2 * -16) + (velocity * time) + height
print(answer)
ValueError: could not convert string to float: 'What was the initial height?\n'
why does the code not want to convert?
inputto readheight.height = input("What was the initial height?\n")