Starting out with Python 3E Chapter 6. PC #5 and #6 Combine
Chapter 6. PC #5 and #6 Combined and modified. HomeworkAssignment (read instructions carefully) Write a program that asksthe user for the name of a file. Assume that the file contains aseries of integers, one on each line. The program should read allthe numbers from the given file, calculate their total and average,and then display the total and average of all numbers in thefollowing format (three decimal digits):
Test Case 1
| Standard Input | Files in thesame directory |
|---|---|
| input1.txt |
input1.txt input2.txt input3.txt input4.txt |
Please enter the file name or type QUIT to exit:nTotal: 11.800nAverage: 2.950n
Test
PayPal Gateway not configured
PayPal Gateway not configured