Hello fellow repliters, I have been learning Python for five weeks and am still not very good at it. When I run this code, I get an error that the word 'denotation' is not defined when it actually is defined in the function titled 'word'. If you can help me, I would appreciate it a lot.
I can help! If you define a variable in a function, that variable is considered local and can only be used inside that function. You have to define the variable outside of every class and function to make sure that everything in your program can use it. This is true for all programming languages.