XYZ _Revised_ by hallvabo

z=w=n=input()
x=y=1
X=' '*n+'X'
Y=' '*n+'Y'
while z:print'%-*s%-*s%*s'%(w,X[-x:]+X[x*2:],w,Y[-y:]+Y[y*2:],z,'Z'*(w>z>1or w));n-=2;x+=n>0or-1;y+=n>0;z-=1

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page