Created
May 1, 2022 09:22
-
-
Save mailtodanish/8521bac571ffb27db8adbc14de8c7a8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read input from STDIN. Print output to STDOUT | |
# Size: 7 x 21 | |
# ---------.|.--------- | |
# ------.|..|..|.------ | |
# ---.|..|..|..|..|.--- | |
# -------WELCOME------- | |
# ---.|..|..|..|..|.--- | |
# ------.|..|..|.------ | |
# ---------.|.--------- | |
import sys | |
r, c = 9, 27 | |
t = int(r/2) | |
print("\n") | |
print("Design Door Mat".center(29), "\n") | |
def print_to_stdout(*a): | |
print(*a, file=sys.stdout) | |
for i in range(t): | |
x = int((c - 3)/2) | |
print_to_stdout((".|." * i).rjust(x, "-") + | |
".|." + (".|." * i).ljust(x, "-")) | |
print_to_stdout('WELCOME'.center(c, '-')) | |
for i in range(t): | |
x = int((c - 3)/2) | |
print_to_stdout((".|." * (t-i-1)).rjust(x, "-") + | |
".|." + (".|." * (t-i-1)).ljust(x, "-")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment