Python Development Course
Chapter
>
Level

Creating Lists
Combining String Lists

Objective

Collect several fruits and a jar and put them together in a list so you can combine them into fruit juice.

Just like with numeric lists you can also combine string lists and use the combinations to produce other materials.

First, grab the empty jar and walk to the dark X marks so you can also collect some water using the collect() function, like this: player.collect(ā€waterā€) . Afterwards store these materials in a list named base , like this: base = [ā€jarā€, ā€œwaterā€] .

Afterwards collect the four (4) different fruits found in the field and store them in their own list named fruits in the same manner as the previous list. The fruits in question are: ā€œorangeā€ , ā€œappleā€ , ā€œpearā€ and "peachā€ .

Once lists have been set up, head over to the light X mark so we may combine the items into a new substance. First add (+) the two lists together into a single list named mixture, like this: mixture = [base + fruits] .

While standing on the X mark while facing the blanket, use the combine() function with the new list as a value. This will allow you to create fruit juice and complete the level.

Code book