Google's doodle on kids coding: shortest program solving all the levels
Not my answer

6 blocks

The user Alex found a shorter solution, of length 6. I can confirm that their solution works:

O(O(Br G G, 6) Br, 5)




They attempted to edit this question to add this answer, so I'm assuming they want it to be displayed here. I don't like how the reputation system works around here.

The message they left:


  The editor doesn't have 10 rep, but does have a solution of length 6. O(O(RGG,6)R,5)


After a few days they responded again via editing the post with: "Thanks for doing this. Editing this was the only way I saw to get a message. I am happy it exists at all. Feel free to bring it into a new post if you want though."

Old answer

7 Blocks

O(O(G G Br, 4) G Br, 100)


Patience required.

Edit: The image was wrong.