pythagorean triples exercise

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Fri Oct 22 20:17:11 EDT 2010


In message 
<cdea67ad-2d9c-4d30-9055-62e62d4c548c at p26g2000yqb.googlegroups.com>, Baba 
wrote:

>         csqrt = math.sqrt(csqrd)
>         for c in range (1, csqrd):
>             if c * c == a * a + b * b and math.floor(csqrt) == csqrt:
>                 print (a,b,c)

Is there such a term as “bogosearch”?



More information about the Python-list mailing list