Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DopamineDriven/0d9ea93d1e346bd63148f392696d5c36 to your computer and use it in GitHub Desktop.
Save DopamineDriven/0d9ea93d1e346bd63148f392696d5c36 to your computer and use it in GitHub Desktop.
Determining the Magnitude and Angle of Force using Vector components Fx and Fy
import math
print("Solving for theta of force components x and y.")
x=input("input force component x:")
y=input("input force component y:")
x=float(x)
y=float(y)
z=math.atan(y/x)
theta=math.degrees(z)
w=((x**2+y**2)**0.5)
print(w)
print(theta)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment