Question: PYTHON QUESTION: Problemm Here's something to stop you from getting repetitive when writing essays. Write a program that reads multiple lines of plain text from
PYTHON QUESTION:

Problemm Here's something to stop you from getting repetitive when writing essays. Write a program that reads multiple lines of plain text from the user, then prints out each different word in the input with a count of how many times that word occurs. Don't worry about punctuation or case the input will just be words, all in lower case. Your output should list the words in alphabetical order For example Enter line: which witch Enter line: is which Enter line: which2 witch1 9 Hint This code should help-if you build up a dictionary from the input, this will let you print the words in order: # This is a test dictionary. # You will need to build one from the input. occurrences'swim 2, swan' 1 for word in sorted (occurrences): print(word, occurrences [word]) swan 1 swim 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
