Designer Door Mat

Sort by

recency

|

1756 Discussions

|

  • + 0 comments

    N, M = map(int,input().split()) # Altura de la figura (impar) patron = '.|.' W = "WELCOME"

    estamos haciendo la parte de arriba el primer triangulo

    for i in range(1, N, 2): print((patron * i).center(M,'-'))

    welcome

    print(W.center(M,'-'))

    ahora el mismo triangulo pero devolviendose

    for i in range(N-2, -1, -2): print((patron * i).center(M,'-'))

  • + 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))
    
  • + 0 comments
    input_list  = list(map(int, input().split()))
    
    center_design = math.floor(input_list[0] / 2)
    
    def print_top_design():
        for loop_index in range(center_design):
            i = 2 * loop_index + 1
            mid_design = '.|.'
            design = (mid_design*i).center(input_list[1], '-')  
            print(design)
    
    def print_bot_design():
        for loop_index in range(center_design - 1, -1, -1):
            i = 2 * loop_index + 1
            mid_design = '.|.'
            design = (mid_design*i).center(input_list[1], '-')  
            print(design)
    
  • + 1 comment

    That's such a creative task for Mr. Vincent! Designing a door mat with precise specifications while incorporating "WELCOME" in the center sounds like both a challenge and an opportunity to show artistic skill. fairplay login

  • + 0 comments

    n,m=map(int,input().split()) for i in range(n): if in//2: print((".|."*((n-i-1)*2+1)).center(m, "-") `