Question: using pycharm. and can't use numpy def ColumnSwap(Amarix,coll,col2): Purpose: swap the values in matrix Amatrix, for the two columns given by coll and col2 Amatrix:

 using pycharm. and can't use numpy def ColumnSwap(Amarix,coll,col2): Purpose: swap the

using pycharm. and can't use numpy

def ColumnSwap(Amarix,coll,col2): Purpose: swap the values in matrix Amatrix, for the two columns given by coll and col2 Amatrix: a matrix having at least two columns. Amatrix is not required to be square coll and col2: the column numbers (indexes) of the two columns for which the values will be swapped return value: the A-matrix after the values in the two columns have been swapped To test the function, write and call a main) function that does the following: Creates the two matrices (Al and A2) given below. Calls ColumnSwap, sending it matrix Al, so that it swaps the first and the second column, and then prints the answer. Calls ColumnSwap, sending it matrix A2, so that it swaps the second and the fourth column, and then prints the answer. Be sure to separate the two printed answers by at least one blank line. 1 2 3 4 "42 =1432 5 6 7 8 Hint: if you have two variables (Aland B) each containing a value, and you want to swap the values in those two variables, in most computer languages, it takes 3 lines of code: temp-A B-temp

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!