i'm trying to run this loop in my program to calculate the average of H I need to calculate value's of 2 arrays for each element of those arrays and then add them up.
Htot = 0
for i in range (0, len(redshift)):
H = ((300000*redshift[i])/(np.power(10, (appmag[i]-19.0+5)/5))
Htot = Htot + H
Hgem = Htot/len(redshift)
print Htot
But I get an invalid syntax error at Htot = Htot + H