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.
M=int(input())
N=int(input())
for i in range(M):
for j in range(N):
if (i%2==0):
print("+",end=" ")
else:
print("-",end="")
print()
Comments
Leave a comment