maxHList = [(5,3),(7,4),(9,5)]
totalH = 0
maxH = 0
x = 0
while x < len(maxHList):
totalH = math.sqrt(pow(maxHList[x+1][0] - maxHList[x][0],2) + pow(maxHList[x+1][1] - maxHList[x][1],2))
maxH += totalH
x += 1
I am going +1 over the list length and i get this error but if i say
while x < len(maxHList)-1:
then i dont ge the correct result