Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I would like a walk through on how to develop a python ver 3.x based application. This application must allow a user to enter the

I would like a walk through on how to develop a python ver 3.x based application. This application must allow a user to enter the values of two 3X3 matrices and then select from any of the following options. Addition, subtraction, matrix multiplication, as well as element by element multiplication. I am trying to see how numpy.matmul() works for matrix multiplications. This is also known as np.matmul(a,b). Then end goal of the program should be able to compute the appropriate results, return the results, as well as transpose those results, provide the mean of the rows for the results, and finally the mean for each column of the results. The program will need a check used to ensure that the values getting entered by the user for the matrices are in fact numeric. (no letters) Also the user interface will need to continue to run until the user indicates they are ready to exit the program. Please document every step of the way. I am reading through the steps in a book and they aren't outlining it well for me and seeing this being done will help me to build my own program. A rough outline of how the output of the program should look can be found below.

***************** Welcome to the Python Matrix Application***********

Do you want to play the Matrix Game?

Enter Y for Yes or N for No:

Y

2

Enter your first 3x3 matrix:

1 2 4 4 2 1 3 8 9

Your first 3x3 matrix is:

1 2 4 4 2 1 3 8 9

Enter your second 3x3 matrix:

3 2 1 7 2 5 5 2 1

Your first 3x3 matrix is:

3 2 1 7 2 5 5 2 1

Select a Matrix Operation from the list below:

a. Addition

b. Subtraction

c. Matrix Multiplication

d. Element by element multiplication

a

You selected Addition. The results are:

4 4 5

11 4 6

8 10 10

The Transpose is:

4 11 8

4 4 10

5 6 10

The row and column mean values of the results are:

Row: 4.33, 7, 9.33

Column: 7.66, 6, 7

3

Do you want to play the Matrix Game?

Enter Y for Yes or N for No:

N

*************** Thanks for playing the Matrix Game **********

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

Students also viewed these Programming questions

Question

How and why GISs are used in real estate industry?

Answered: 1 week ago