Question: 3. Write a python script (program) titled createmat.py that prints out each of the following matrices as numpy arrays or matrices. Do not manually

3. Write a python script (program) titled createmat.py that prints out each of the following matrices as numpy arrays or matrices. Do not manually assign the numbers at each position of the matrix, rather have code do it for you. For example, use a loop(s). Try to create the matrices with as few lines of code as possible. (a) A 10 x 10 matrix A that looks like this 1 2 10] 2 3 11 A = 3 4 12 B 10 11 19 (b) A 10 x 10 matrix B that looks like this B = 1 2 2 3 246 10 ... 20 30 10 20 100 (c) Write a python script that will have an input n and the output will be both matrices like above, but n x n instead of fixed at n = 10. Test your program on with n and at least one other value of n. = 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
