Reference no: EM132354833
Question
(Conditionals, and Loops)
How to design and implement a program that prompts the user for numbers.
the program should continue prompting for values until the user enters -1, at which point it should exit.
For each input provided, your program should print a running tally of the sum and average of numbers input so far.
When the user exits the program, it should print a summary line indicating the number of inputs provided, the sum of the input numbers, and the average of the numbers that the user provided as input to this program.
A sample run of your program might look as follows (human input is in bold/purple, and program output is in blue/italics):
Please enter a number (enter -1 to exit): -5
Stats for Inputs provided so far: Sum: -5. Average: -5.
Please enter a number (enter -1 to exit): 10
Stats for Inputs provided so far: Sum: 5. Average: 2.5.
Please enter a number (enter -1 to exit): -1
Stats for ALL Inputs provided: 2. Sum: 5. Average: 2.5.
Show how to design the program for maximal reuse by using modules and functions (as necessary).
Name the file: statsmain.py. If you make a module, name it stats.py.