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

Hi, I try the code in class9(binary search), it tells UnboundLocalError: local variable 'mid' referenced before assignment. Can anyone help me?

OpenStudy (anonymous):

you would have to post your code. please use a code pasting site like http://dpaste.com http://pastebin.com do you understand what the error means? http://docs.python.org/2.7/library/exceptions.html#exceptions.UnboundLocalError

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!