We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Strings
- Designer Door Mat
- Discussions
Designer Door Mat
Designer Door Mat
Sort by
recency
|
1745 Discussions
|
Please Login in order to post a comment
n, m = list(map(int,input().split())) x = int((m-3)/2) y = 1 a = int(m/n) b = n - 2 for i in range(0,int(n/2)): print('-'*x + '.|.'*y + '-'*x) x = x - 3 y = y + 2 print('-'*int((m-7)/2) + 'WELCOME' + '-'*int((m-7)/2) ) for i in range(0,int(n/2)): print('-'*a + '.|.'*b + '-'*a) a = a + 3 b = b - 2
Enter your code here. Read input from STDIN. Print output to STDOUT N,M = map(int, input().split(" ")) for i in range(1,N):
if i%2 != 0: print((".|."i).center(M,"-")) else: pass
print("WELCOME".center(M,"-"))
for i in range(1,N):
if i%2 != 0: print((".|."(N-1-i)).center(M,"-")) else: pass
N, M = map(int, input().split(" "))
message = 'WELCOME'
pattern = '.|.'
mid = N//2
for i in range(mid):
print((pattern*((i*2)+1)).center(M, '-'))
print(message.center(M, '-'))
for i in range(mid-1, -1 , -1):
print((pattern*((i*2)+1)).center(M, '-'))