day1/exercise/pytriads.py
branchscipy2010
changeset 428 ee689f7c3122
parent 380 669b72283b55
--- a/day1/exercise/pytriads.py	Mon Jun 28 01:37:42 2010 -0500
+++ b/day1/exercise/pytriads.py	Mon Jun 28 23:17:31 2010 -0500
@@ -8,10 +8,11 @@
     if a % b == 0:
         return b
     else:
-        return gcd(b, a%b)
+        return gcd(b, a % b)
 
 for a in range(3, 101):
-    for b in range( a+1, 101, 2):
-        if gcd( a, b ) == 1:
+    for b in range(a + 1, 101, 2):
+        if gcd(a, b) == 1:
             is_ps, c = is_perfect_square((a * a) + (b * b))
-            if is_ps: print a, b, c
+            if is_ps:
+                print a, b, c