Newb ??

F

Fredrik Lundh

Norman said:
< snip>

Fredrik, thank you very much indeed for taking the trouble to show me the
way. I am sorry that I made the comment I did, that will teach me to read
more carefully. It is said that there is no fool like an old fool and, as
I am approaching 78 years old, I think I qualify. It is also said that you
are never too old to learn so I am trying.

Now, I put the script you gave into an editor and ran it , (I use Ubuntu
Linux by the way). It certainly showed how the computer arrived at the
number guessed but guessed the number itself and gave me no chance to say
whether high or low. I noticed also that the numbers were all greater than
50 and the loop ran until the number guessed was 100, then it stopped.
Perhaps you can point out to me how I should go about debugging.

debugging? the script I posted was intended to show you that given an
honest human (simulated by the raw_input function), the posted algorithm
found the right answer for all values in the given range. (if the algorithm
had been broken, the simulator wouldn't have finished).

if you want to play yourself, use Steven's original code, and follow the in-
structions...

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top