Hollow Rectangle - 2
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.Therefore, the output should be
+----------+
| |
| |
| |
+----------+
Sample Input 1
3
10
Sample Output 1
+----------+
| |
| |
| |
+----------+
Sample Input 2
5
10
Sample Output 2
+----------+
| |
| |
| |
| |
| |
+----------+
m=int(input())
n=int(input())
st='+'
stb='|'
for i in range(n):
st+='-'#height
stb+=' '
st+='+'
stb+='|'
print(st)
for i in range(m):
print(stb)
print(st)
Comments
Leave a comment