summaryrefslogtreecommitdiff
path: root/day1/exercise/pytriads.py
diff options
context:
space:
mode:
authorSantosh G. Vattam2010-03-11 18:01:23 +0530
committerSantosh G. Vattam2010-03-11 18:01:23 +0530
commit9638afaff8985d5528cb38842c13cc71cd6cab83 (patch)
tree671a499f31425f35ea158136da94f7a5272749d8 /day1/exercise/pytriads.py
parentfb965a5047dca69c518543440c2a6fd5647555c4 (diff)
downloadworkshops-more-scipy-9638afaff8985d5528cb38842c13cc71cd6cab83.tar.gz
workshops-more-scipy-9638afaff8985d5528cb38842c13cc71cd6cab83.tar.bz2
workshops-more-scipy-9638afaff8985d5528cb38842c13cc71cd6cab83.zip
Updated after Day 2 at GRDCS
Diffstat (limited to 'day1/exercise/pytriads.py')
-rw-r--r--day1/exercise/pytriads.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/day1/exercise/pytriads.py b/day1/exercise/pytriads.py
index bea543d..caf9137 100644
--- a/day1/exercise/pytriads.py
+++ b/day1/exercise/pytriads.py
@@ -10,8 +10,8 @@ def gcd(a, b):
else:
return gcd(b, a%b)
-for a in range(3, 501):
- for b in range( a+1, 501, 2):
+for a in range(3, 101):
+ 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