Teacher's Guide
Chapter 3 / Level 2: Basic Operators
Teaching Objective:
- Student learns how to interface variables with operators
- Understands how to add and subtract values in python
- Learns how operators affect the exercises and are used with functions
Guide
The core of this exercise is to learn the capabilities of operations while coding. Collect all the eggs in the field and store the number of eggs in the corresponding variables of: white_eggs, dark_eggs, red_eggs.
white_eggs = 3
dark_eggs = 3
red_eggs = 3
Once the student gathered the eggs and the variables set up walk to the dark X mark, face the bar and use the speak() function to add (+) the numbers together and subtract (-) bad eggs from the batch. There are four (4) bad eggs in total.
player.speak(white_eggs + dark_eggs + red_eggs - 4)
After this action, walk to the light X mark, face the bar and use the speak() function to add up the nutritional value of the eggs. Red eggs are twice as nutritious as the rest.
white_eggs -= 2
dark_eggs -= 1
red_eggs -= 1
red_eggs * 2
Subtract (-) the bad eggs from the variables and multiply the red eggs by two (2) then add them all together using the speak() function.
player.speak(white_eggs + dark_eggs + red_eggs)
Map overview and path

Code Solution
import player
player.turn_left()
player.move_forward(3)
player.turn_right()
player.move_forward()
player.turn_left()
player.move_forward(4)
player.turn_right()
player.move_forward(2)
player.turn_right()
player.move_forward(4)
player.turn_left()
player.move_forward(2)
player.turn_left()
player.move_forward(4)
player.turn_right()
player.move_forward(4)
player.turn_right()
player.move_forward(6)
player.turn_right()
player.move_forward()
white_eggs = 3
dark_eggs = 3
red_eggs = 3
player.speak(white_eggs + dark_eggs + red_eggs - 4)
player.turn_left()
player.move_forward()
player.turn_right()
white_eggs -= 2
dark_eggs -= 1
red_eggs -= 1
red_eggs *= 2
player.speak(white_eggs + dark_eggs + red_eggs)