1. Engineering
  2. Computer Science
  3. write a fnctional programme in python...

Question: write a fnctional programme in python...

Question details

Write a fúnctional programme in python:Write a function mean_rms_file0 which receives as single input argument a file name as a string. The function shall open the file and read the single-column data and calculate the mean value of the numbers in the file as well as the RMS (root mean square) value, see below. You can test your function with Spyder using the supplied data1.txt file from the python folder on the moodle website (Result: mean -20.95, RMS 21.1569..) Return the mean value and the RMS value as a tuple in that order. Note that the RMS value is defined as where σ2 is the variance of the data, a,mean the mean value

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution