I am working on python code and I was trying to calculate distance of an object if the height , angle and original velocity was given. this was my code. It doesn't work it gives me an error message every time.
import subprocess as sp
import math
sp.call('cls',shell=True)
pangle = float(0.0)
distance = float(0)
a = float(0)
y = float(0)
v = float(0)
a = input("Angle:")
y = input("Hight (Meter):")
v = input("Speed (M/S):")
try:
a = float(angle)
y = float(hight)
v = float(speed)
except:
sp.call('cls',shell=True)
print("Error")
error = input("")
exit
distance = float((v * (math.cos(math.radians(a/1))))*(v * math.sin(math.radians(a)) + ((v * math.sin(math.radians(a)))^2+2*y)**(1.0/2)))
sdistance = str(distance)
print ("Distance is " + sdistance + " Meter")
error = input("")
exit
Please Help