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

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -