Python Assignment 3
Python Assignment 3
Reg no:20baa7008
Output:
Enter the number of rows=3
Enter the number of columns=3
Enter the elements of matrix
1
2
3
4
5
6
7
8
9
First matrix is:
[1,2,3]
[4,5,6]
[7,8,9]
Output:
Enter the row number for matrix1=3
Enter the column number for matrix2=3
Enter the column number for matrix1/row number for matrix2:3
Enter the elements for matrix 1
1
2
3
4
5
6
7
8
9
Matrix1:
[1,2,3]
[4,5,6]
[7,8,9]
Enter the elements for matrix2
10
11
12
13
14
15
16
17
18
Matrix2:
[10,11,12]
[13,14,15]
[16,17,18]
The multiplication of two matrices are:
[84,90,96]
[201,216,231]
[318,342,366]
Output:
Enter the number of rows:3
Enter the number of columns:3
Enter the elements for th matrix 1
1
2
3
4
5
6
7
8
9
Matrix1:
[1,2,3]. [1,4,7]
[4,5,6]. [2,5,8]
[7,8,9] [3,6,9]