Write a python program that takes two numbers (Integer) as inputs from the user. Consider the 1st number to be the total number of rows and the 2nd number to be the total number of columns of a rectangle. [For this question, you can assume the second input is always greater than the first input. So, no checking is needed for ensuring this condition.] Finally, print a rectangle as shown in the output. ============================================================= Sample Input 1: 3 6 Sample Output 1: 1===== 12==== 123=== Explanation 01: 3 is the total number of rows and 6 is the total number of columns. For each row, numbers starting from 1 to that row number are printed and the rest of the columns are filled by equal (=) to sign. ============================================================= Sample Input 2: 6 7 Sample Output 2: 1====== 12===== 123==== 1234=== 12345== 123456= Explanation 02: 6, is the total number of rows, and 7 is the total number of columns. For each row, numbers starting from 1 to that row number are printed and the rest of the columns are filled by equal (=) to sign.
Write a python program that takes two numbers (Integer) as inputs from the
user. Consider the 1st number to be the total number of rows and the 2nd
number to be the total number of columns of a rectangle. [For this
question, you can assume the second input is always greater than the first
input. So, no checking is needed for ensuring this condition.] Finally,
print a rectangle as shown in the output.
=============================================================
Sample Input 1:
3
6
Sample Output 1:
1=====
12====
123===
Explanation 01:
3 is the total number of rows and 6 is the total number of columns. For
each row, numbers starting from 1 to that row number are printed and the
rest of the columns are filled by equal (=) to sign.
=============================================================
Sample Input 2:
6
7
Sample Output 2:
1======
12=====
123====
1234===
12345==
123456=
Explanation 02:
6, is the total number of rows, and 7 is the total number of columns. For
each row, numbers starting from 1 to that row number are printed and the
rest of the columns are filled by equal (=) to sign.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images