Designer Door Mat

  • + 0 comments
    def designDoorMatList(n , m):
        c_char = ".|."
        o_char = "-"
        res = ""
        res_list = []
        for i in range(1,int(n+1/2)):
            if i%2 != 0 :
                q = (m - len(c_char)*i)/2
                res = o_char*int(q) +  c_char*i + o_char*int(q)
                res_list.append(res)
        p1 = ""
        for j in res_list:
            print(j)
        print(o_char*int((m-7)/2) + "WELCOME" + o_char*int((m-7)/2))
        res_list.reverse()
        for j in res_list:
            print(j)   
            
    input_list  = list(map(int, input().split()))
    N = input_list[0]
    M = input_list[1]
    designDoorMatList(int(N), int(M))