Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Attribution for debug_me.py.

  • Loading branch information...
commit 5eefca6f638d0e35aad48a51e36644de9f1294ee 1 parent f65d3f6
@inducer authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 debug_me.py
View
7 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
Please sign in to comment.
Something went wrong with that request. Please try again.