Question: Description: The word statistics program will prompt the user to input a list of words separated by spaces. Then the program will display a list

Description:

The word statistics program will prompt the user to input a list of words separated by spaces. Then the program will display a list of options for the user to pick from. Options:

1. Display Word List Ordered A-Z

2. Display Length of each Word in the List

3. Display Word List Statistics

4. Count Number of Words with Even/Odd Length

5. Count Number of Words that have a Prime Length

6. Enter New Word List

7. Quit Program

Note: Each option should have at least 1 method associated to it. Some of those methods like the one for display list statistics should have supporting methods.

Sample Output:

Enter List of Words Separated by Spaces:

Kyle floor table Paris hi no my floor

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program

1

[Kyle, Paris, floor, floor, hi, my, no, table]

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program

2

Kyle Length is 4

Paris Length is 5

floor Length is 5

floor Length is 5

hi Length is 2

my Length is 2

no Length is 2

table Length is 5

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program

3

Min Word Length: 2

Max Word Length: 5

Total Number of Characters: 30

Average Word Length: 3.75

Most Frequent Word: floor

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program

4

Number Even: 4

Number Odd: 4

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program

5

Number of Prime in list: 7

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program

6

Enter List of Words Separated by Spaces:

Test just a test

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program

1

[Test, a, just, test]

Please make a selection:

1) Display List Ordered

2) Display Word Length

3) Display List Statistics

4) Number of Odd/Even Words

5) Check for Prime Length

6) Enter New Word List

7) Quit Program 7

Program Exiting

Please add comments to the code so I can compare it to my code to see where I have gone wrong Thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!