NPTEL PROGRAMMING ASSIGNMENTS
The Joy of Computing using Python
Week 6: Programming Assignment 1 - Matrix
Due on 2021-09-09, 23:59 ISTGiven two integers r and c, indicating the number of rows and columns, print a two-dimensional matrix such that the elements of the matrix are in an increasing sequence from 1 to rXc, in a row-major order.
Input Format:
First line of the input contains two space separated integers indicating the rows and columns
Output Format:
Display r lines indicating the elements of the Matrix
Example:
Input:
3 3
Output:
1 2 3
4 5 6
7 8 9
Given two integers r and c, indicating the number of rows and columns, print a two-dimensional matrix such that the elements of the matrix are in an increasing sequence from 1 to rXc, in a row-major order.
Input Format:
First line of the input contains two space separated integers indicating the rows and columns
Output Format:
Display r lines indicating the elements of the Matrix
Example:
Input:
3 3
Output:
1 2 3
4 5 6
7 8 9
Week 6: Programming Assignment 2 - Number Triangle I
Week 6: Programming Assignment 3 - Symmetric Matrix
Due on 2021-09-09, 23:59 ISTGiven a N X N square matrix, determine if it is a Symmetric Matrix.
Input Format:
The first line of the input contains an integer N which represents the number of rows and the number of columns.
Next N lines represent the elements of the matrix.
Output Format:
Print Yes or No
Example:
Input:
3
1 -2 3
-2 3 1
3 1 2
Output:
Yes
Given a N X N square matrix, determine if it is a Symmetric Matrix.
Input Format:
The first line of the input contains an integer N which represents the number of rows and the number of columns.
Next N lines represent the elements of the matrix.
Output Format:
Print Yes or No
Example:
Input:
3
1 -2 3
-2 3 1
3 1 2
Output:
Yes