Your question is Solar Panel Efficiency Calculation. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A panel operating on a Nextracker NX Horizon tracker receives solar energy based on the measured irradiance and its surface area. Write a function that calculates the panel's conversion efficiency as a percentage.
Use the formula:
efficiency = output_power / (irradiance * panel_area) * 100
The function should return the result as a floating-point number. Do not round the result unless required by the caller.
Implement calculate_efficiency(irradiance, panel_area, output_power), where all three parameters are positive or zero numeric values measured as follows:
irradiance: incident solar power in watts per square meter (W/m²)panel_area: panel surface area in square meters (m²)output_power: electrical power produced by the panel in watts (W)Return the efficiency percentage as a float. Inputs will satisfy irradiance > 0 and panel_area > 0.
def calculate_efficiency(irradiance, panel_area, output_power):