Question: In this assignment, you will write a Python program that asks the user for a list of words, and then prints the shortest word,
![In this assignment, you will write a Python program that asks the user for a list of words, and then prints the shortest word, the longest word, and the average length of the words. Here is a sample run of the program (note that user input is in black, and printing from the program is in blue): Python 3.6.5 Shell Eile Edit Shel Debug Options Window Help Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 b it (AMD64)] on win32 Type copyright, credits or license () for more information -RESTART : U:cis111al ? 18 projectsproj 5.py Enter a list of words, separated by spaces: apple carrot pineapple plum watermelon peach Shortest word: plum Longest word: watermelon Average word length: 6.50 Ln: 10 Col: 4 Also, please note that the list of words entered by the user was typed WITHOUT hitting Enter until after the very last word. The word list was wrapped below to the second line automatically.](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2022/08/6308d2de66c58_6546308d2de0b47b.jpg)

In this assignment, you will write a Python program that asks the user for a list of words, and then prints the shortest word, the longest word, and the average length of the words. Here is a sample run of the program (note that user input is in black, and printing from the program is in blue): Python 3.6.5 Shell File Edit Shell Debug Options Window Help Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 b it (AMD64)] on win32 Type "copyright", "credits" or "license ()" for more information. >>> RESTART: U:\cislll\fall18\projects\proj5.py ================ ===== Enter a list of words, separated by spaces: apple carrot pineapple plum watermelon peach Shortest word: plum Longest word: watermelon Average word length: 6.50 >>> X =========== Ln: 10 Col: 4 Also, please note that the list of words entered by the user was typed WITHOUT hitting Enter until after the very last word. The word list was wrapped below to the second line automatically. Requirements Your project file should be named proj5.py. Your program should run the Python shell. If you haven't already, make sure you watch the lectures on Functions, Advanced Functions, Strings, and Strings (Continued), which walk through several examples that are similar to this assignment. Your project must include the following functions: get_shortest, which takes a list of words as a parameter, and returns the word in the list whose length is the shortest get_longest, which takes a list of words as a parameter, and returns the word in the list whose length is the longest get_average, which takes a list of words as a parameter, and returns the average length of those words . These functions should be written before the "main code" for the project. I recommend looking at the format of a bigger Python program with functions, like the Hangman program from Lecture 12 and 14. Here are additional tips/requirements for your program: You may assume that the user will correctly enter a list of words separated by spaces You should round the average word length to two decimal places when printing it (hint: use conversion specifiers) .
Step by Step Solution
3.41 Rating (145 Votes )
There are 3 Steps involved in it
To complete this assignment youll need to create a Python program with three functions getshortest g... View full answer
Get step-by-step solutions from verified subject matter experts
