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
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.
Please find attached my version of hangman. All comments highly appreciated.
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.
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!
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/
I get the following message:"Loading word list from file... 55900 words loaded."
ok, sorry - wrong words.txt - the one in ps2 is a single line
is most simple to undestand your code
men thanks a lot
Join our real-time social learning platform and learn together with your friends!