Question: what am i doing wrong plz explain the code is in python Create a function called symMtx (n), with a default argument of 5 ,

what am i doing wrong plz explain
the code is in python
 what am i doing wrong plz explain the code is in
python Create a function called symMtx (n), with a default argument of

Create a function called symMtx (n), with a default argument of 5 , which returns a symmetric matrix of the form [[1,2,3,,n1,n],[2,1,2,,n1,n],[3,2,1,,n1,n], [n,n1,,3,2,1]] and show that for b=symMtx(),b gives: [[1,2,3,4,5],[2,1,2,3,4],[3,2,1,2,3],[4,3,2,1,2],[5,4,3,2,1]] Show b=symMt(5) returns the same result. Finally, show the result for n=7. [29]: def symtx( n : matrix=[] for i in range (1,n+1): row=[] for j in range (1,n+1): row. append(min(i,j)) matrix. append(row) print(matrix) symutx(5) [[1,1,1,1,1],[1,2,2,2,2],[1,2,3,3,3],[1,2,3,4,4],[1,2,3,4,5]]

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!