Question: In Python 3) Write a function named nameLenComment. The function nameLenComment should prompt the user for a name and then print a comment telling the
In Python
3)
Write a function named nameLenComment. The function nameLenComment should prompt the user for a name and then print a comment telling the user whether their name is short, about average, or long. (You may assume that the user provides valid input.) The function nameLenComment takes two integer parameters: short and long. If the length of the user's name is less than or equal to short, print the user's name and the comment, your name is short. If the length of the user's name is greater than or equal to long, print the user's name and the comment, your name is long. Otherwise print the user's name and the comment, your name is about average length. The function nameLenComment should return the user's name. For example, the following would be valid input and output. print(nameLenComment(4,8)) What's your name? Athena Athena, your name is about average length Athena
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
