You are viewing a single comment's thread. Return to all comments →
n,m=input().split() n=int(n) m=int(m) c=1 for i in range(1,n+1): if i<(n+1)//2: avg=(m-(c*3))//2 print((avg*'-')+c*'.|.'+(avg*'-')) c+=2 elif i==(n+1)//2: s='WELCOME' avg=(m-(len(s)))//2 print('-'*avg+s+'-'*avg) c-=2 else: avg=(m-(c*3))//2 print((avg*'-')+c*'.|.'+(avg*'-')) c-=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 →
n,m=input().split() n=int(n) m=int(m) c=1 for i in range(1,n+1): if i<(n+1)//2: avg=(m-(c*3))//2
print((avg*'-')+c*'.|.'+(avg*'-')) c+=2 elif i==(n+1)//2: s='WELCOME' avg=(m-(len(s)))//2 print('-'*avg+s+'-'*avg) c-=2 else: avg=(m-(c*3))//2 print((avg*'-')+c*'.|.'+(avg*'-')) c-=2