✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Write a Python program that reads a file containing numbers (possibly across multiple lines). The program should:
Convert the values to floats.
Store them in a list.
Compute and print the average (mean) of all numbers in the file.
10 20 30
25 35
15 5 10
A sample code execution is:
Enter the filename: text3.txt
The average is 18.75
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!