Question: python Alinear equation of n variables can be represented as a list of n floats. For example 2x+3y+1.4z=6 can be represented as [2, 3, 1.4,

python python Alinear equation of n variables can be represented as a list

Alinear equation of n variables can be represented as a list of n floats. For example 2x+3y+1.4z=6 can be represented as [2, 3, 1.4, 6] and systems of linear equations like 3x+3y=2, 5x+3y=8 can be represented as lists of lists as [[3,3,2,...).(5,3,8....]]. Write a function equan(a) that takes a system of linear equations as an input list of lists and modifies the input by multiplying each of its rows by a scalar such that each diagonal entry will be equal to one. For example, the statement: a=[[3,4,5),(6,7,8]] equan(a) print(a) outputs [1, 4/3,5/3],[6/7, 1, 8/7] since equan divides the elements in the first list by 3 and the second list by 7 such that a[0][0] and a[111] (diagonal entries) are equal to one. Answer (penalty regime: 0 %)

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!