On 10/21/2010 6:55 AM, Baba wrote:
Hi everyone

i need a hint regarding the following exercise question:

"Write a program that generates all Pythagorean triples whose small
sides are no larger than n.

This is not well worded. I take 'small sides' (plural) to mean the two smaller, non-hypotenuse sides (which are necessarily shorter than the hypotenuse). So the possible pairs of values i,j, where i is the shorter of the two, have

Try it with n<= 200."

Again, not well worded; I believe this is meant to be n==200, except that the program should take n as a parameter and then give it value 200, so that the could work if n were given some other value.

So the possible pairs of values i,j, where i is the shorter of the two, have j <= n (==200) and i <= j.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to