Question: Python: Write a program in a file called averageLength.py This program asks the user for three strings and prints the average length of the strings

Python:
Write a program in a file called averageLength.py
This program asks the user for three strings and prints the average length of the strings entered.
Display only 2 digits after the decimal point.
HINT: the average of three numbers is computed by adding the three numbers and dividing the result by 3.
HINT: the length of a string is computed using the function len. Len("hello") return 5
Examples:
% python3 averageLength.py
enter first string: a
enter second string: b
enter third string: c
the average length is: 1.00
% python3 averageLength.py
enter first string: hello world
enter second string: hello world world
enter third string: hello hello world world
the average length is: 17.00
%

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 Databases Questions!