Mathematica Asked on February 20, 2021
I’m looking for the shortest (in terms of characters) code snippet to make an n-square checkerboard. Here’s my first try (comes in at 72 characters):
Graphics@{PatternFilling["Checkerboard", ImageScaled[1/10]],
Rectangle[]}
And my second try, which is a bit shorter (42 characters):
Image @ Table[.5 + (-1)^(i + j)/2, {i, 10}, {j, 10}]
Try Image[Array[Mod[#+#2,2]&,{8,8}]]
Answered by boomboom on February 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP