When they asked to set value of variables spam and eggs to True and False correspondingly.
It means they asked to create them outside of any function, as Global variables.
When you create them inside the function.
They exist till function is called and you print them.
After that they (
eggs) have no existence .
They're Local variables.
there is a way to pass it..by making them global variables..
You can make them global using global keyword. (Just for experimentation ,As It is not intention of this exercise)
(I assume that you already done this exercise and trying to experiment with it?)