" When we call
greet_customer , the message
"Cleanup on Aisle 6" is not printed, as it is not part of the function."
Although I agree that
"Cleanup on Aisle 6" shouldn’t have been printed, I think the point they were trying to make here is that any other code not written after 2 indentations (or whatever indentation the function defines) will not be part of the function.
If we use the same function anywhere else, only
print(“Welcome to Engrossing Grocers.”)
print(“Our special is mandarin oranges.”)
print(“Have fun shopping!”)
will be printed, and won’t include print(“Cleanup on Aisle 6”).
In the example, because the latter was written after the function, the output will, as a result, print it, as well. But, again, what bothers me is “Remove the indent on the second print statement. Run the file. Now what’s printed?”