PS3.Hangman: Hello I have a problem with the hangman problem, my code is kinda like this: def hangman(secretWord): variables some lines .... while mistakesMade < 8 and rompe == 0:
print '-------------' print 'You have',leftGuessed,'guesses left.' availableLetters = getAvailableLetters(guess) print "Available letters: ",availableLetters word = getGuessedWord(secretWord, guess) if word == secretWord: testNewWord(new,guess,secretWord,word) print '------------' return "Congratulations, you won!" else: new = (raw_input('Please guess a letter: ').lower()) As you can see, my raw_input is in that "else". the edX site gave me this error: Your function should include calls to 'raw_input' to get the user's guess. Does anybody have an idea??
ye delete, all the comments the grader and u have...if ur program is a working one it should run....the comments they have put give some bug.... delete the '''bla bla comment bla bla ''' aswell. gl!
Haha ok i'll try it out, and I let you know.
ok !:)
Great!! without that and then without the: secretWord = chooseWord(wordlist).lower() hangman(secretWord) it worked, thanks!!!
hahah ye had the same exsactly as errors lol Gz!
Join our real-time social learning platform and learn together with your friends!