Designer Door Mat

Sort by

recency

|

1745 Discussions

|

  • + 0 comments
    N, M = map(int, input().split())
    
    # Top half
    for i in range(1, N - 1, 2):
        print(('.|.' * i).center(M, '-'))
        
    # WELCOME line
    print('WELCOME'.center(M, '-'))
    
    # Bottom half
    for i in range(N - 2, 0, -2):
        print(('.|.' * i).center(M, '-'))
    
  • + 0 comments

    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

  • + 0 comments

    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

  • + 0 comments

    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, '-'))

  • + 0 comments
    # get the # rows & columns
    rows, columns = map(int, input().split())
    # define main pattern
    design_1 = '.|.'
    design_2 = '-'
    for i in range(1,rows+1):
      # top cone
      if i <= (rows//2) :
        print(((2*i-1)*design_1).center(columns,design_2))
      # center
      elif i == (rows//2+1):
        print('WELCOME'.center(columns, design_2))
      # bottom cone
      elif i > (rows//2):
        print((((2*rows+1)-(2*i))*design_1).center(columns,design_2))