NameError: name '' is not defined

Why would the following code throw the error below:

Q1

I’ll reply to myself after realizing I was not using ‘’…