subject

Matrix operations - python

def display_menu():
""" prints a menu of options
"""
print()
print('(0) enter a new matrix')
print('(1) negate the matrix')
print('(2) multiply a row by a constant')
print('(3) add one row to another')
print('(4) add a multiple of one row to another')
print('(5) transpose the matrix')
print('(6) quit')
print()

def print_matrix(matrix):
""" prints the specified matrix in rectangular form.
input: matrix is a 2-d list numbers
"""
## you will revise this function.
print(matrix)

def get_matrix():
""" gets a new matrix from the user and returns it
"""
matrix = eval(input('enter a new 2-d list of numbers: '))
return matrix

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:00
Data is processed, stored, and transmitted as a series of 1s and 0s. each 1 or 0 is called a(n) . a series of eight 0s and 1s, called a(n) , represents one character—a letter, number, or punctuation mark. data becomes when it is presented in a format that people can understand and use. digital signals are represented by two different , such as +5 volts and +.2 volts. digital data can also take the form of light and dark spots etched onto the surface of a cd or the positive and negative orientation of particles on the surface of a hard disk. data consists of numbers that might be used in arithmetic operations. it can be represented digitally using the number system. data is composed of letters, symbols, and numerals that are not used in arithmetic operations. computers represent this type of data using , ebcdic, unicode, or utf-8. data is quantified using terms such as or kibibyte (1024 bytes), and prefixes such as or mebi (1,048,576), and giga or (1,073,741,824). to reduce file size and transmission times, digital data can be compressed. compression provides the means to compress data and reconstitute it into its original state. compression throws away some of the original data during the compression process. compressed files usually have at the end of the file name and are represented with special icons. these files have to be or unzipped before you can view the data they contain.
Answers: 1
question
Computers and Technology, 22.06.2019 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 ½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
Answers: 1
question
Computers and Technology, 24.06.2019 10:10
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
Answers: 1
You know the right answer?
Matrix operations - python

def display_menu():
""" prints a menu of options
...
Questions
question
Mathematics, 07.01.2021 06:10
question
Mathematics, 07.01.2021 06:10
question
Mathematics, 07.01.2021 06:10
question
Mathematics, 07.01.2021 06:10
question
Social Studies, 07.01.2021 06:10
question
Arts, 07.01.2021 06:10
question
Mathematics, 07.01.2021 06:10