I have this snippet in my web application. Question is why doesn't the
stupid thing loop ten times? It loops exactly 1 time.

  # Reset counter
    counter = 0


    while counter <= 10:
        #if test != '':
        tourn=games[counter][0]
        round=games[counter][1]
        date=games[counter][2]
        opponent=games[counter][3]
        oppRating=int(games[counter][4])
        oppElo=int(games[counter][5])
        res=games[counter][6]

        eloChange=float(Elocalc(myElo,oppElo,modifierK,res))

        if myRating > oppRating:
            HL='H'
            rdiff=myRating-oppRating
        else:
            HL='L'
            rdiff=oppRating-myRating
        result=res+HL

        #Call function
        if myRating <=2199:
            rchange=LASKcalc(rdiff, result)
        else:
            rchange=LASKcalc(rdiff, result)/2

        if res == '1':
            verbalres='win'
        elif res== '=':
            verbalres='draw'
        else:
            verbalres='loss'


        return "<p>Long line with games</p>"

        counter=counter+1

-- 
Regards,

Martin S
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to