[Tutor] exercise (while loop)

Danny Yoo dyoo at hashcollision.org
Tue Apr 1 19:29:02 CEST 2014

> So this call will always try to round None(the default return value)
> And of course it produces no output since it prints nothing.
> Are you sure that's actually what is in the book?

No.  That's very much why I wanted a reference to the original source
of the problem.

Scott attributed too much to the book when he presented the problem.
In the original content,


it simply presents a running dialogue exploring the idea of computing
square roots iteratively, culminating in a toplevel for-loop that
simply prints out its improving guess.  There is no function there.

This is why we want to be a bit more careful when saying "The book
said this..." following up with a paraphrase, because sometimes we can
get the paraphrasing wrong.  Similarly issues occur when one is
presenting error message content and asking for debugging advice.
Pointing to primary sources is usually a good idea, especially when
debugging or trying to get at root causes.

Let's head-off this sort of confusion quickly next time.

More information about the Tutor mailing list