# [Tutor] python problem

Michael Langford mlangford.cs03 at gtalumni.org
Tue Sep 25 06:56:22 CEST 2007

```Look here. Do this: http://en.wikipedia.org/wiki/Binary_search

--
Michael Langford
Phone: 404-386-0495
Consulting: http://www.TierOneDesign.com/
Entertaining: http://www.ThisIsYourCruiseDirectorSpeaking.com

On 9/25/07, Chris <balderas at whtvcable.com> wrote:
>
>  ****
>
> ***I have this**** GUESSING GAME code found below:*****
>
> ---------------------
>
> import random
>
> number = random.randint(1, 101)
>
> print "I've thought of a number between 1 and 100."
>
> print "Try and guess it!"
>
> print
>
> guess = input( "What's your guess? ")
>
> while guess != number:
>
>     if guess > number:
>
>         print "Your guess is too high."
>
>     else: #elif guess < number:
>
>         print "Your guess is too low."
>
>     guess = input( "What's your next guess? " )
>
>
>
> print "Congratulations! You guessed the number."
>
> ----------------------------------------------------
>
> *******What do I have to******** do to the code so that******** the
> Guessing Game******** that tries to guess a number the user has thought
> of. (Make sure it can tell if the user tries to cheat, e.g. by changing
> the number during the game********??*
>
> *I hope you can help!*
>
> *Chris*****
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.487 / Virus Database: 269.13.25/1018 - Release Date:
> 9/19/2007 3:59 PM
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070925/482a1f69/attachment.htm
```