python - Why doesn't it take a new value from the list -
i have problem taking new values list velocity. instead of taking new values each iteration, takes same value. have clue problem is?
def average_wind(dia): wind_list=[] velocity=[20,1,1,30,1,1,1,98,1,1,1,1,1] t in range(1,13): r=0.2 area=klass.windpower.calc_area(dia) energy=1*klass.windpower.calc_wind_energy(area,velocity[t]) wind_list.append(energy) return (wind_list)
another question, see wrong how coded formula, similar formula pa = 1/2*0.35*1.2*a*v^3:
def calc_wind_energy(self,area,velocity): energy=(0.35*1.2*area*(velocity ** 3))*0.5 return energy
Comments
Post a Comment