[Tutor] What would you say is the best way to continue learning python

Gregor Lingl glingl@aon.at
Sun, 22 Sep 2002 09:50:41 +0200


Magnus Lycka schrieb:

> 8. Write a program that proves that when n is an integer,
> n > 2, the equation x**n + y**n = z**n has no solution in
> positive integers x,y,z. (x**n is the Python notation for
> x to the power of n, i.e. 4**3 = 4*4*4.)
>
>
> /Magnus
>
> P.S. Assignment number 8 is not trivial.
>
1. Python (version >=2.2) certainly is especially well suited for
this problem, because of its automatic type conversion between int
and long.

2. Moreover this problem has the advantage, that speed of
execution doesn't play any role. Python would solve it in
exactly the same time as for instance C.

3. This assignment is especially rewarding, if you decide not to use
your computer any more (for anything else) ;-)

4. If not, a less ressource-consuming problem would be to determine
all triples (x,y,z) within e given range, with no common divisor,
that solve the equation x**2+y**2=z**2.

Gregor