Koch Island by hallvabo

s=['/\\','\\/']
n=0
exec"""n+=1;t=['']*2**(2*n+1)
for i in range(len(s)):
\x09for c in s[i]:x=cmp(c,'/');a=' '*4;t[4*i]+=['   /','\\/\\ ',a][x];t[4*i+1]+=['/\\ \\\\','  / ',a][x];t[4*i+2]+=['\\ \\/',' /  ',a][x];t[4*i+3]+=['/   ',' \\/\\\\',a][x]
s=t
"""*input()
print'\n'.join(s)

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

download

return to the top page