Question
Python: Number Analysis Program Design a program that asks the user to enter a series of 5 numbers. Non-numeric data should be filtered out as
Python:
Number Analysis Program
Design a program that asks the user to enter a series of 5 numbers. Non-numeric data should be filtered out as the sample output shows. The program should store the numbers in a list and then display the following data:
1. The lowest number in the list. 2. The highest number in the list. 3. The total of the numbers in the list. 4. The average of the numbers in the list.
First, the program should compute the required data using the functions like min for the lowest, max for the highest, and sum for the total. Second, the program should compute the required data without using those built-in functions. The program should be written in one code in which two of the solutions are put.
Sample output(s):
Enter number 1 of 5: 98 Enter number 2 of 5: 76 Enter number 3 of 5: a10 Non-numeric data! Another run...
Enter number 1 of 5: 10 Enter number 2 of 5: 15 Enter number 3 of 5: 20 Enter number 4 of 5: 30 Enter number 5 of 5: 25
The results without using the built-in functions: ------------------------------------------------- Low: 10.0 High: 30.0 Total: 100.00 Average: 20.00
The results using the built-in functions: ------------------------------------------ Low: 10.0 High: 30.0 Total: 100.00 Average: 20.00
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