From 5eefca6f638d0e35aad48a51e36644de9f1294ee Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 12 May 2012 02:37:28 -0400 Subject: [PATCH] Attribution for debug_me.py. --- debug_me.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debug_me.py b/debug_me.py index 635b087..328fc2d 100644 --- a/debug_me.py +++ b/debug_me.py @@ -24,11 +24,14 @@ def fermat(n): """Returns triplets of the form x^n + y^n = z^n. Warning! Untested with n > 2. """ - from itertools import count + + # source: "Fermat's last Python script" + # https://earthboundkid.jottit.com/fermat.py + # :) + for x in range(100): for y in range(1, x+1): for z in range(1, x**n+y**n + 1): - #from pudb import set_trace; set_trace() if x**n + y**n == z**n: yield x, y, z