
Write a function, determine_profit, which returns the daily profit. You should use the various functions you have written previously, along with equation (10) to write this new function. \[ \text { daily_profit }=\text { daily_revenue - daily_cost_to_pump } \] A docstring for the function is given below: def determine_profit(height_difference, pumping_time, gen_power, 1 day_tariff, night_tariff, efficiency, water_base_mass,time_increment): "I" Function to determine profit by pumping upwards and then releasing at night. Parameters height_difference (float): the height difference between the upper and lower reservoirs [m] pumping time (float): the number of daytime hours that water is pumped [hours] gen_power (float): generator power used to pump water [kW] day_tariff (float): day-time energy cost per kWh [\$/kWh] night_tariff (float): night-time energy cost per kWh [$/kWh] efficiency (float): efficiency of conversion of between electrical and potential energy and vice versa [\%] water_base_mass (float): the mass of water in the reservoir at the start of every day (i.e. before upward pumping commences) [kg] A sample usage for the function is given below. >> profit = determine_profit (200,8,20E+03,0.02,0.1,80,40_000,30) >> profit 7040.052744524599