I am trying to write a program that inputs a sentence from the keyboard, word by word, into a list. The program should output the following.
The complete sentence, with the first word capitalized if it wasnt already, spaces between each word, and a period at the end.
The count of the number of words in the sentence.
For instance, if the input is:
the
cat
ran
home
quickly
Your program should output:
The cat ran home quickly. There are 5 words in the sentence.
listMessage = []
message = input('Enter first word of your message: ')
while message != 'done!':
listMessage.append(message)
message = input('Please enter the next word of your message or type done! when complete ')
return listMessage