Write a program to print a rectangle pattern of
The first line of input is an integer
In the given example,
3 rows and 10 columns.
M = int(input())
N = int(input())
horizontal_border = f'+{"-" * N}+'
line = f'|{" " * N}|'
output = horizontal_border
for row in range(M):
output += f'\n{line}'
output += f'\n{horizontal_border}'
print(output)
Comments
Leave a comment