Write a python program that prints a rectangle of size M (height/line numbers) and N (length/column numbers) using incrementing numbers where M and N will be given as input. Please look at the examples below for clarification.
Hint: You may need to use nested loops and print the loop counter variable in one of the loops.
==========================================================
Sample Input 1:
4
6
Sample Output 1:
123456
123456
123456
123456
m = int(input('M='))
n = int(input('N='))
for i in range(m):
for j in range(1, n+1):
print(j, end='')
print('')
Comments
Leave a comment