Deviopath › Karel

Row of Balls

Easy · For Loops

Put a ball on every square of the row, including the first and the last one.

Writing putBall(); move(); eight times works, but a for loop can repeat those lines for you. Notice that Karel needs one more ball than moves.

Next: Pile of Five