Question
1.Implement a function called MinimumWordLength(), which should return the length of the shortest word in the list. 2.Implement a function called MaximumWordLength(), which should return
1.Implement a function called MinimumWordLength(), which should return the length of the shortest word in the list.
2.Implement a function called MaximumWordLength(), which should return the length of the longest word in the list.
3. Implement a function called RangeOfWordLengths(), which should return the range of lengths in the word list.
4. Implement a function called WordLengthMean(), which should return the average word length in the word list. The method should return the average, rounding down (or taking the floor) to the next lowest integer. 5
5. Implement a function called WordLengthMode(), which should return the most common length of the words in the list. If there is a tie, you should return -1. You may assume that the length of a word is at most 100 and at least 1.
Using the array ["hello", "there", "wonderful"] (which has size 3), MinimumWordLength returns 5, MaximumWordLength returns 9, RangeOfWordLengths returns 4, WordLengthMean returns 6, and WordLengthMode returns 5.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started