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

I am having problems with PS6, problem 3. When the computer tries to find a word with a given hand I get an error message associated with the time taken for the computer to input a word. When the player inputs a word it is fine - I get the following output message: 'It took "input_time" seconds to provide an answer'. But when the computer does it I get the following message: 'It took seconds to provide an answer'. This is followed by an error message. Does anyone know why?

OpenStudy (anonymous):

Could you pastebin or dpaste your code? I'll take a look.

OpenStudy (anonymous):

http://dpaste.com/hold/787297/ The code is very long and I'm not sure if it will make much sense. The important parts are the following functions: play_hand(), and input_time(). Also, this is the error message that I get: TypeError: unsupported operand type(s) for +=: 'float' and 'function' Any advice would be appreciated. Thanks

OpenStudy (anonymous):

Line 249: >>> time = input_time() <----- missing () You have some other issues after that, just holler if you need a hand with em, otherwise I'll leave you to investigate :)

OpenStudy (anonymous):

I can't believe I missed that. Thanks so much. You are right, I do have other problems which I'm working on now. Thanks again!

OpenStudy (anonymous):

Anytime ... happy debugging :)

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!