Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 21 Online
OpenStudy (anonymous):

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:

OpenStudy (anonymous):

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??

OpenStudy (microbot):

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!

OpenStudy (anonymous):

Haha ok i'll try it out, and I let you know.

OpenStudy (microbot):

ok !:)

OpenStudy (anonymous):

Great!! without that and then without the: secretWord = chooseWord(wordlist).lower() hangman(secretWord) it worked, thanks!!!

OpenStudy (microbot):

hahah ye had the same exsactly as errors lol Gz!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!