Question #228454

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


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

|     |

|     |

|     |

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


Expert's answer

M = int(input())
N = int(input())
print("+"+N*"-"+"+")
for _ in range(M):
    print("|"+N*" "+"|")
print("+"+N*"-"+"+")




LATEST TUTORIALS
APPROVED BY CLIENTS