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, 21.06.2019 22:00
When determining the classification of data, which one of the following is the most important consideration? a. processing systemb. valuec. storage mediad. accessibility
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
What is a dashed line showing where a worksheet will be divided between pages when it prints? a freeze pane a split box a page break a print title
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 2
You know the right answer?
Matrix operations - python

def display_menu():
""" prints a menu of options
...
Questions
Questions on the website: 13722360