Question: python 3) Prompt the user for a sentence. Using the split method and a while loop, print each word of the (15pts) sentence on a
3) Prompt the user for a sentence. Using the split method and a while loop, print each word of the (15pts) sentence on a separate line. Coding Steps 1. Prompt the user for a sentence sentence = input("Enter a sentence: ") 2. Create a list of words and find the length of the list listOfWords = sentence split0 # create a list of words nbrWords = len(listofWords): #find length of the list (number of words in the sentence) 3. Create a while loop to cycle through the words in the sentence. while
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
