"WM." <wfergus...@socal.rr.com> wrote
def DisplayBoard(HANGMAPIX, MissedLetters, CorrectLetters, SecretWord):
for Letter in MissedLetters:
Blanks = '_' * len(SecretWord)
for i in range(len(SecretWord)):
....
for Letters in Blanks:
MissedLetters = ''
while True:#151
DisplayBoard(HANGMANPIX, MissedLetters, CorrectLetters,
First time through the program MissedLetters is empty so the for loop
never executes and Blanks is not initialised. The second for loop then
fails. You need to initialise Blanks at the head of the function.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor