Editor

Growing Plant

Rearrange the lines · Beginner · about 4 min

A plant is 5 cm tall and grows 3 cm a week. This program prints its height each week until it reaches 20 cm. Its lines are mixed up: put them back in an order that prints exactly the output below. Each line keeps its indentation, so you only choose the order.

Example

In the right order, the program prints:

After week 1 the plant is 8 cm
After week 2 the plant is 11 cm
After week 3 the plant is 14 cm
After week 4 the plant is 17 cm
After week 5 the plant is 20 cm
Done in 5 weeks

Your program

0 of 7 placed

Add the first line from the blocks.

Blocks

7 blocks still to place
The solution opens after your first Check.