Deviopath › Karel

Copy the Row

Hard · Algorithms

The bottom row has piles of balls. Make an exact copy of it in row 2, right above: each square in row 2 should get as many balls as the square below it. The bottom row must stay as it was.

Your code runs in several worlds. Remember that counting balls means picking them up, so put them back afterwards.

Next: Paint the Room