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

In ps3b, my comp_choose_word is acting really weird. It returns None. Also, if it gets to n = 0, it doesn't seem to return True on the opening "if n == 0:" By the way, I realize that the way I'm structuring the computer vs. user is a little different than the instructions, but I like it better this way ;)

OpenStudy (anonymous):

OpenStudy (anonymous):

I'm not sure why you are calling n in the function. Call the wordlist. You can keep n in the scope of the function by just using length of the hand. Your problem is probably the lack of a call to the wordlist generating none. Try printing word_list[1] and see if a word is printed. I'm betting you're calling an empty list and getting none.

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!