Question: Implement the following function in the PyDev module functions.py and test it from a PyDev module named t09.py: Work with the numbers.txt file in
Implement the following function in the PyDev module functions.py and test it from a PyDev module named t09.py: Work with the numbers.txt file in this question. def count_frequency_value(fh, **** value): Counts the number of appearances of value in fh. Use: count count_frequency_value(fh, value) Parameters: fh - file to search (file handle - already open for reading) the value to count (int) value - Returns: count the number of appearance of value in fh (int) H Sample testing: file numbers.txt' open for reading: Value to count: 9 19 appears 2 time(s).
Step by Step Solution
There are 3 Steps involved in it
Here is the code for the countfrequencyvalue function PYTHON def countfrequencyvaluefh value Counts ... View full answer
Get step-by-step solutions from verified subject matter experts
