OK so I came across an old Google Doodle recently:
https://www.google.com/doodles/celebrating-50-years-of-kids-coding
It is to write six programs in that applet using a block language (like MIT Scratch). Very cute.
Now, Google gives you a ribbon if you write the shortest code (in terms of blocks). The steps in their shortest code program is shown in the screenshot below, it's the number inside the ribbon. To be very clear, this is like shortest lines-of-code, not fewest runtime steps. A short program may not be efficient.
Now for the challenge: I was able to solve that last program with 5 blocks instead of Google's shortest solution of 6. So, see if you also can do better than Google's shortest solution, on any of the programs. I could only improve the last one.
And don't forget to share this with your young friends who might be interested in coding!
Blocks programming languages are friendly programming languages for kids. I personally hate blocks programming languages as you are not as free as typing codes. Literally, not a lot of people on codeforces would care about that challenge.
I found this 4 block solution to the last one:
I did not realise one could change the loop count... (its possible to solve all in googles optimal number of steps without changing the loop count...)
6 blocks solution for 4th problem
Fantastic — boy, Google really didn't spend any effort on figuring out the true "shortest", huh?!!
I think the level 4th level only need 6 blocks: