From f151766af67a8001d4d80148c5bd20e91c9acaaf Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Mon, 12 Apr 2010 15:53:14 +0000 Subject: [PATCH] Wrap executable code so it can be used a library git-svn-id: file:///srv/svn/euler@35 e5f4c3ec-3c0c-11df-b522-21efaa4426b5 --- e003.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e003.py b/e003.py index 4ef4229..fd29eee 100644 --- a/e003.py +++ b/e003.py @@ -8,5 +8,6 @@ def pfactor(n): p.append(i) return sorted(p, reverse=True) -print 'Prime factors of 600851475143:' -print pfactor(600851475143) +if __name__ == '__main__': + print 'Prime factors of 600851475143:' + print pfactor(600851475143)