You are viewing a single comment's thread. Return to all comments →
N, M = map(int,input().split()) # Altura de la figura (impar) patron = '.|.' W = "WELCOME"
for i in range(1, N, 2): print((patron * i).center(M,'-'))
print(W.center(M,'-'))
for i in range(N-2, -1, -2): print((patron * i).center(M,'-'))
Seems like cookies are disabled on this browser, please enable them to open this website
Designer Door Mat
You are viewing a single comment's thread. Return to all 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,'-'))