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
|
1799 Discussions
|
Please Login in order to post a comment
It really pushes you to think about formatting and alignment, which are essential for producing clean output—especially in real-world applications like UI layout or console design. Mahadevbook777 Login
Enter your code here. Read input from STDIN. Print output to STDOUT
if name == "main": nums= list(map(int,input().split())) n,m = nums c=".|." sep="-" welcome="WELCOME" steps= list(range(1,n,2)) #print(steps) for i in steps: print((c*i).center(m,sep)) print(welcome.center(m,sep)) steps.reverse() for i in steps: print((c*i).center(m,sep))
R,C=map(int,input().split(' ')) for i in range (1,R,2): print((".|."*i).center(C,'-')) print("WELCOME".center(C,'-')) for j in range (R-2,-1,-2): print((".|."*j).center(C,'-'))