20 Questions code in Python?
csteacher17 (6)

Does anyone have a basic 20 Questions code for Python? I'm referring to the game that can guess what you're thinking of in 20 questions or less.

You are viewing a single comment. View All
21natzil (1209)

I don't have the code, but maybe this will help you make it. Q20 uses a binary search algorithm, which actually is much simpler then it sounds. This site has an example: http://openbookproject.net/py4fun/animal/animal.html