Question: Kadir Has University Computer Engineering computer programming Ce140 Python coding Write a function named vec Mag that calculates the magnitude of a 3-dimensional vector. The




Write a function named vec Mag that calculates the magnitude of a 3-dimensional vector. The input should be a list of three floats while the magnitude of a 3-dimensional vector (a,b,c) is calculated as (a**2+b**2+c**3)** (1/2). Answer: (penalty regime: 0 % 1 Write a function named vectorNorm that normalizes a vector (finds the unit vector). A vector can be normalized by dividing each individual component of the vector by its magnitude. Your input for this function will be a vector i.e. 1 dimensional list containing 3 integers. For example if the input list is: vector = [2, 3, -4] Then you should return the unit vector(1- Dimensional list) such as: [0.3713906763541037, 0.5570860145311556, -0.7427813527082074] Answer: (penalty regime: 0 %) 1 Write a function named triangle Area which takes either one, two or three positive floats as parameters. If three parameters a, b and care provided, the function should return the area of a triangle with side lenghts a,b,c. If two parameters a and b are provided it should return the area of a isosceles triangle with side lenghts a, a and b. If a single parameter "a" is provided then the function should return the area of a equilateral triangle with side lenghts a, a, a. Answer: (penalty regime: 0 %) 1 Write a function named matProd that takes two matrices (two 2-dimensional lists of floats) and returns their cross products. The function should return "Matrix sizes do not match" if the row and column sizes of the inputs does not allow a cross product. Answer: (penalty regime: 0 %) 1 | Write a function romNum that takes an int between 1 and 1000 as an input argument and returns the same number as a Roman numeral. Answer: (penalty regime: 0%) 11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
