Question: Name your Python file matrixmultiplication.py. You may only use the sys module for this script. It should accept as arguments from the command line the
Name your Python file matrixmultiplication.py. You may only use the sys module for this script. It should accept as arguments from the command line the following parameters in the following order: m_dimension, n_dimension, p_dimension. If one or more parameters is missing, the program should return usage information and exit. $ python matrixmultiplication . py Usage : $ python matrixmultiplication . py < m_dimension > < n_dimension > < p_dimension > For example, one run of your program must adhere to the following format (i.e., the numbers may change) $ python matrixmultiplication . py 2 3 2 Enter Values for Matrix A : Enter element A [0][0]: 1 Enter element A [0][1]: 2 Enter element A [0][2]: 3 Enter element A [1][0]: 4 Enter element A [1][1]: 5 Enter element A [1][2]: 6 Enter Values for Matrix B : Enter element B [0][0]: 1 Enter element B [0][1]: 2 Enter element B [1][0]: 3 Enter element B [1][1]: 4 Enter element B [2][0]: 5 Enter element B [2][1]: 6 The matrix product C is : | 22.000000 28.000000 | | 49.000000 64.000000 | In this case, we are multiplying two matrices 1 2 3 4 5 6 1 2 3 4 5 6 = 22 28 49 64 After each line Enter element A[ ][ ], this should prompt the user to fill in the value for that element in the matrix. Thus, the user must fill out the matrices for each run of the code. For code style, I will look at how you name variables (following PEP), consistency of your indentation, and the descriptiveness and consistency of your comments to what the code actually does. No need to comment every line of code, but include descriptions of what small subsections of code are doing. For example, describe what happens in the loop body, etc.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
