We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Strings
- Designer Door Mat
- Discussions
Designer Door Mat
Designer Door Mat
Sort by
recency
|
1788 Discussions
|
Please Login in order to post a comment
My Code in Python:
col_m, row_n = [int(x) for x in input().split(' ')]
x = '.|.'
y = row_n // 2
for i in range(col_m // 2): print((x*i).rjust(y - 1,'-') + x + (x*i).ljust(y - 1,'-'))
print('WELCOME'.center(row_n, '-'))
for i in range((col_m // 2) - 1, -1, -1): print((x*i).rjust(y - 1,'-') + x + (x*i).ljust(y - 1,'-'))