# Program 2: Word Counter # Known Bugs (may have others): # 1. Word count is wrong def count_words(sentence): """Count the number of words in a sentence.""" if sentence == "": return 1 words = sentence.split() word_count = len(words) + 1 return word_count test_sentences = [ "Hello world", "", "Python programming is fun", "One" ] for sentence in test_sentences: print(f"Word count: {count_words(sentence)}")