Quick French Flag explainer


The aim of this puzzle: Draw the French flag using two drawBoxes() functions and a newLine() function.

Walkthrough of the solution: In the code view, the puzzle starts with:


Which draws a blue box (‘b’), a white box (‘w’) and then a red box (‘r’). The aim of the puzzle is to create the French Flag. To do that, the Grasshopper cursor needs to be moved onto the next line, then the pattern repeated (blue box, then white box, then red box). To move the cursor onto a new line the newLine() function should be used. Once the cursor is on a new line, add another drawBoxes() function and then tap on the str key to bring up a qwerty keyboard and enter the string 'bwr'.

Sample code solution:
(Tap below to reveal)


JavaScript Concepts: Calling Functions, strings
Grasshopper Concepts: drawBoxes()