Mosaic matrix: Difference between revisions
Content added Content deleted
(→{{header|Haskell}}: Added a Haskell version) |
|||
Line 529: | Line 529: | ||
<lang python>'''Mosaic grid''' |
<lang python>'''Mosaic grid''' |
||
# mosaic :: Int |
# mosaic :: Int -> [[Int]] |
||
def mosaic(n): |
def mosaic(n): |
||
'''Grid of alternating ones and zeroes, |
'''Grid of alternating ones and zeroes, |
||
Line 572: | Line 573: | ||
' '.join([str(x) for x in y]) for y in rows |
' '.join([str(x) for x in y]) for y in rows |
||
]) |
]) |
||
# MAIN --- |
# MAIN --- |