The function word_frequency(words) should take a list of words and return a dictionary mapping each word to how many times it appears.
It crashes on the very first word every single time. The error happens on a line that looks perfectly logical.
Why does Python refuse to increment something that doesn't exist yet?