Question: Build a python program that will allow the user to input Matrix data in a similar format to your Final Project. On the first line,

Build a python program that will allow the user to input Matrix data in a similar format to your Final Project. On the first line, the user will enter the number of rows followed by the number of columns. On the second line the user will input all matrix integers separated by spaces. On the third line the user will enter a single integer. If that number exists in the matrix, the program should PRINT the row number and column number for all matching integers in the given matrix. In addition, this program should loop until the user enters 0 for both the row and column information.
NOTES:
Assume All Inputs are Integers
If the special number is not found, nothing should be printed to the screen
example user input 1
23
123435
3 # The special number is 3
00 # 0 and 0 entered for next data set
The data entered represents the following matrix:
123
435
example program output for user input 1:
3 found @ (0,2) in a Matrix 1
3 found @ (1,1) in a Matrix 1
The program ends because 00 was entered for the next matrix
example user input 2
32
113435
1
23
123435
3
00
The first matrix has 3 rows and 2 columns
12
34
35
The special number is 1
the next matrix has 2 rows and 3 columns
123
435
The special number is 3
Finally 0 and 0 is entered for the next dataset
example program output for user input 2:
1 found @ (0,0) in a Matrix 1
1 found @ (0,1) in a Matrix 1
3 found @ (0,2) in a Matrix 2
3 found @ (1,1) in a Matrix 2
The program ends because 00 was entered

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!