Answer to Question #302995 in Python for pushi

Question #302995

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.



1
Expert's answer
2022-02-27T04:23:31-0500
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()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS