Question: Define a function named read_sum_odds ( fi lename) which takes a filename as a parameter. The function reads numbers from the file line by line

Define a function named read_sum_odds ( fi lename) which takes a filename as a parameter. The function reads numbers from the file line by line and calculates the sum of all the odd numbers per line. The function returns a list of sums. For example, if a text file contains the following numbers: then the function returns [15,45,13]. Note: the function should convert each element into an integer in order to calculate the total. You can assume that the file is a plain text file and only contains valid integers. For example
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
