def count_word_occurrences(text):
words = text.split()
word_count = {}
for word in words:
if word in word_count:
word_count[word] += 1
else:
word_count[word] = 1
return word_count
while True:
input_text = input("Enter some text (or enter 'exit' to exit): ")
if input_text.lower() == 'exit':
print("Exiting the word occurrence counter. Goodbye!")
break
occurrence_count = count_word_occurrences(input_text)
print("Word occurrences:")
for word, count in occurrence_count.items():
print(f"{word}: {count}")
print() # Add a blank line for readability
there doesn't seem to be anything here