Question: a) Write a function with signature VectorLength(x, y) that computes the length of a vector, v with components in cartesian coordinates (x, y). i.e.,
a) Write a function with signature VectorLength(x, y) that computes the length of a vector, v with components in cartesian coordinates (x, y). i.e., |v| = x + y Use NumPy for the square root function. b) Using the VectorLength(x, y) function print the length of vectors with components v = (5, 6) and v = (-1,5) c) Modify this command print("Sin (1) Sin (1) = 0.8414709848078965 = ", np.sin(1)) to print the result to only three decimal places
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
