Teacher's Guide
Chapter 2 / Level 7: String Variables
Teaching Objective:
- Student understands how to use strings in variables
- Level reinforces the previous level’s lesson but adds more correlation with variables, and items and adds more layers to the exercise
Guide
Collect each of the three items in the map and store them into variable. The variables are to be named: bag1, bag2, bag3 and the items are to be named: “Pumpkin”, “Eggplant” , “Tomato”
bag1 = "Pumpkin"
bag2 = "Eggplant"
bag3 = "Tomato"
After the student finishes collecting the items and putting them in variables, head over for the chests designated by X marks. Open the chests using the open() function, then placing the variables using the place() function and finally closing the chest using the close() function.
player.open()
player.place(bag1)
player.close()
.......
player.open()
player.place(bag2)
player.close()
.......
player.open()
player.place(bag3)
player.close()
Map overview and path

Code Solution
import player
player.turn_left()
player.move_forward(7)
bag1 = "Pumpkin"
bag2 = "Eggplant"
bag3 = "Tomato"
player.turn_left()
player.move_forward(3)
player.open()
player.place(bag1)
player.close()
player.turn_left()
player.move_forward(3)
player.turn_right()
player.open()
player.place(bag2)
player.close()
player.turn_left()
player.move_forward(3)
player.turn_right()
player.open()
player.place(bag3)
player.close()