You are viewing a single comment's thread. Return to all comments →
n,m = map(int,input().split()) top_bottom_loop = (n - 1) // 2 # top layer dot_pattern = 1 for i in range(top_bottom_loop): hyphen = (m - 3 * dot_pattern) // 2 print('-' * hyphen + ".|." * dot_pattern + '-' * hyphen) dot_pattern += 2 # mid layer hyphen_welcome = (m - 7) // 2 print("-" * hyphen_welcome + "WELCOME" + "-" * hyphen_welcome) # bottom layer dot_pattern -= 2 for i in range(top_bottom_loop): hyphen = (m - 3 * dot_pattern) // 2 print('-' * hyphen + ".|." * dot_pattern + '-' * hyphen) dot_pattern -= 2
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 →