Beginner Coding with Blocks
Chapter
>
Level

Lists and Collections
Combining lists

Objective

Place several supplies in lists and combine them together to form a new product.

It would be a good idea to prepare a dressing for the salad you're planning to have for dinner later. There are 4 different types of items in the field, milk, cream, lettuce and radishes, grab all the items and combine them into a mixture to form Radish dressing.

First grab the milk and cream and put the liquids in a list the same manner as in the previous level by adding the quantities you collect of each. The milk being the white liquid and the cream being the opaque creamy colored liquid. Use the create empty list block to create a liquids list, then use the set item in list block with INSERT mode at LAST position to add the quantities (3 and 4).

Once you grab the liquids and put them in a list, grab the vegetables and do the same. There is another way you can put items in a list if you already know the values you're adding: use the create list with block and add the values directly (3 and 4 for vegetables).

Once you have created both lists, adding them together is easy using the add math block. Connect liquids and vegetables to create the mixture. Once you have created the mixture, head for the X mark, face the blanket laid out on the floor and use the combine block with the mixture variable to mix everything together in a jug.

Code book