I am trying to write program for projectile motion in Python, while entering the values of horizontal velocity and vertical velocity, I am getting the correct results if I enter definite constant values directly in the program.
But when I use the code such that the user the enter the value of angle in degrees, (Importing numpy as np, obviously), I am getting very small answers (for $45^{\circ}$ the value is coming as $-0.0001...$ instead of $40.8$ which is correctly showing when I enter the values of the components of velocity by hand in the program.
Here's my excerpt of the program for reference,
thetaVal = input("Please enter theta value in degrees: ")
theta_val = float(thetaVal)
t = theta_val *180/3.14
v_x0= v_0*np.cos(t)
v_y0= v_0*np.sin(t)
I can't figure out where am I going wrong with this, whether my conversion way is wrong or the code has some issues with the precedence of the statements, I really cant figure out.
Any help would be appreciated thanks!