Question: using python nstructions: Complete the following in a Python script and submit the resulting file to Canvas. 1. Write a well commented Python program capable

using python

using python nstructions: Complete the following in a Python script and submit

nstructions: Complete the following in a Python script and submit the resulting file to Canvas. 1. Write a well commented Python program capable for performing the following matrix operations (these operations will each need their own Python function: a. Matrix Addition/Subtraction* >>def m_add(A,B): b. Matrix Transpose* C. Matrix Multiplication >>def m_transpose (A) >>def mmult (A, B): Code provided in lecture video 2. Place the following arrays in the in your Python module for testing the function your wrote for #1 above: 4 B 1 2 7 4 3 -6 D- 121 7 1 G [7 6 4] 3. To test your functions and your Python array operation skills, perform the following tasks on the inputs array written for #2 using your functions written for #1: a. Given C, calculate C b. Given D, calculate D C. Given B and E, calculate B+E and throw an error if the dimensions are incorrect d. Given A and F, calculate AFand throw an error if the dimensions are incorrect e. Given A and B, calculate AB and throw an error if the dimensions are incorrect f. Given A and B, calculate BA and throw an error if the dimensions are incorrect g. Given Cand G, calculate CG and throw an error if the dimensions are incorrect nstructions: Complete the following in a Python script and submit the resulting file to Canvas. 1. Write a well commented Python program capable for performing the following matrix operations (these operations will each need their own Python function: a. Matrix Addition/Subtraction* >>def m_add(A,B): b. Matrix Transpose* C. Matrix Multiplication >>def m_transpose (A) >>def mmult (A, B): Code provided in lecture video 2. Place the following arrays in the in your Python module for testing the function your wrote for #1 above: 4 B 1 2 7 4 3 -6 D- 121 7 1 G [7 6 4] 3. To test your functions and your Python array operation skills, perform the following tasks on the inputs array written for #2 using your functions written for #1: a. Given C, calculate C b. Given D, calculate D C. Given B and E, calculate B+E and throw an error if the dimensions are incorrect d. Given A and F, calculate AFand throw an error if the dimensions are incorrect e. Given A and B, calculate AB and throw an error if the dimensions are incorrect f. Given A and B, calculate BA and throw an error if the dimensions are incorrect g. Given Cand G, calculate CG and throw an error if the dimensions are incorrect

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!