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

HANGMAN http://dpaste.com/791584/ was very difficult to do this I found a lot of trouble to make everything a string. I would like them to watch and advise me or corrijieran. I also would like to see your code. thanks guys

OpenStudy (anonymous):

I am attaching an example, without using lists. Many useful functions are available if you write "help(str)" in IDLE. Python help is very useful as well.

OpenStudy (anonymous):

http://dpaste.com/792336/

OpenStudy (anonymous):

http://dpaste.com/792352/

OpenStudy (anonymous):

Please find attached my version of hangman. All comments highly appreciated.

OpenStudy (anonymous):

so both of you need to look at your load_words function. i think they only load one word. the readline() method only reads one line.

OpenStudy (anonymous):

My load_words function, same as yours, absolutely no difference. In the solution provided by Niki, she uses string.lowercase constant, but it didn't work for me because the value is locale-dependent!

OpenStudy (anonymous):

when I run your load_words(), it only reads the first line of the text file. do you experience something different? i'm not the OP. my load_words() is different - http://dpaste.com/792889/

OpenStudy (anonymous):

I get the following message:"Loading word list from file... 55900 words loaded."

OpenStudy (anonymous):

ok, sorry - wrong words.txt - the one in ps2 is a single line

OpenStudy (lopus):

everybody many thanks. this the final code http://dpaste.com/793342/

OpenStudy (anonymous):

is most simple to undestand your code

OpenStudy (anonymous):

http://dpaste.com/793942/

OpenStudy (lopus):

men thanks a lot

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!