Python Development Course
Chapter
>
Level

Variables and Types
Placing Objects

Objective

Collect wheat in the field, store it in a variable and place it in the chest then close it to complete the level.

Collect the grain in the field and put them away.

Pick up all the grains on the field, once you pick them up put them into a variable by writing the word “wheat” followed by the number of grains you picked up, like this:

wheat = (number of grains picked up)

Once the variable is ready, go to the X mark in front of the open chest and store the gain by using the place() function. You can use the place function by writing the name of the variable you wish to place in the parenthesis as you face the chest you want to store the grain inside of, like this : player.place(wheat)

Once you’re done putting the wheat away, close the chest using the close() function learned in a previous chapter, like this: player.close()

Code book