On Mon, 7 Feb 2011, Ashley F wrote:

 <snip>
To try to clear this up...
The part of my pseudocode that I'm having trouble putting into actual code in 
python is:
"if that alignment has the best score seen so far
     save the score and that alignment"

Tip: It's helpful to send code, like perhaps the triple loop, that illustrates your problem.

highscore = 0
alignment = somealignment
for x in something:
    for y in somethingelse:
         for z in evenmoresomething:
              if x+y+z > highscore:
                  highscore = x+y+z
                  alignment = newalignment

Is that something to the effect of what you're looking for?

HTH,
Wayne
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to