DNA Analysis NameError: global names 'codons' is not defined. Kindly help. Anyone?

DNA Analysis: The final free form project under python 2

I keep getting an error message
NameError: global names ‘codons’ is not defined
Please help. I can’t seem to find what I’m missing

If you ever encounter this error, restart the exercise and type the code all over again. I just did that and it ran smoothly!