Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- using paython - A linear equation of n variables can be represented as a list of n floats. For example 2x+3y+1.4z=6 can be represented

- using paython -

A linear 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[1][1] (diagonal entries) are equal to one.

Answer:(penalty regime: 0 %)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions