Answer to Question #228454 in Python for saras

Question #228454

Write a program to print a rectangle pattern of M rows and N columns using the characters as shown below.


+----------+

|     |

|     |

|     |

+----------+


1
Expert's answer
2021-08-22T07:15:11-0400
M = int(input())
N = int(input())
print("+"+N*"-"+"+")
for _ in range(M):
    print("|"+N*" "+"|")
print("+"+N*"-"+"+")




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