subject

Implement the following function to sort the columns in a two-dimensional list. A new list is returned and the original list is intact.

def sortColumns(m):

Write a test program that prompts the user to enter a 3 by 3 matrix of numbers and displays a new column-sorted matrix. Note that the matrix is entered by rows and the numbers in each row are separated by a space in one line.

Sample Run

Enter a 3-by-3 matrix row by row:

0.15 0.875 0.375

0.55 0.005 0.225

0.30 0.12 0.4

The column-sorted list is

0.15 0.005 0.225

0.3 0.12 0.375

0.55 0.875 0.4

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
You know the right answer?
Implement the following function to sort the columns in a two-dimensional list. A new list is return...
Questions
question
Mathematics, 29.03.2021 19:50
question
Mathematics, 29.03.2021 19:50
question
Mathematics, 29.03.2021 19:50