Saint Louis University |
Computer Science 1300/5001
|
Computer Science Department |
Topic: Strings and Lists
Related Reading: Revised
Chapter 6
Due:
tbd
Please make sure you adhere to the policies on academic integrity.
Write a program that accepts a sentence from the user on a single line, and which outputs the number of words in the sentence. A sample execution appears as follows:
Enter a sentence: The quick brown fox jumps over the lazy dog You entered 9 words. |
Write a program that prompts the user for a name that is
assumed to be of form
The precise format should match the following sample session.
What is your name? Elmer James Fudd Elmer J. Fudd |