Question: Write a function called main(). The function should take one argument: a string containing the path to a CSV file as described in the Background
Write a function called main(). The function should take one argument: a string containing the path to a CSV file as described in the Background section.
This function should open the specified file for reading and loop over the lines of the file. It should calculate the total cost of the electricity use reported in the file. It should return this amount as a float.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
