word_freq(text) that splits text on whitespace (lowercased) and returns a dict mapping each word to how many times it appears.word_freq('the cat sat on the mat the cat ran'){'the': 3, 'cat': 2, 'sat': 1, 'on': 1, 'mat': 1, 'ran': 1}Count occurrences of each lowercase word.
Loop over `text.lower().split()`, using `d[word] = d.get(word, 0) + 1`.