Guess the number

Can be played at http://www.codeskulptor.org/#user29_iXv7W5KlzJA5vMe.py