From f782816889538c2f57e25fac22c22a2d23031c2b Mon Sep 17 00:00:00 2001 From: zozu Date: Mon, 22 Apr 2013 23:09:08 +0200 Subject: [PATCH 1/4] added fweakout function --- socode.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/socode.py b/socode.py index 6128062..78e07a2 100755 --- a/socode.py +++ b/socode.py @@ -174,7 +174,16 @@ def starefossen(): def jontonsoup(): print "There's always one more bug." - + +def fweakout(x): + print "Just following the rules!" + for i in range(2,int(x**0.5)+1): + if x % i == 0: + return False + return True + + + def monsdar(): print "Hello?..." print " ...yes, this is dog!" @@ -1070,6 +1079,7 @@ def nazgu1(): thisishugo() lcynot() danielnr() + fweakout(9009) ncerminara(3) spratt() aturcino() From e9f692229c0f8d3a30e430de22adcfc2a950a500 Mon Sep 17 00:00:00 2001 From: zozu Date: Mon, 22 Apr 2013 23:36:16 +0200 Subject: [PATCH 2/4] changes --- socode.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/socode.py b/socode.py index 78e07a2..34b54dc 100755 --- a/socode.py +++ b/socode.py @@ -181,8 +181,6 @@ def fweakout(x): if x % i == 0: return False return True - - def monsdar(): print "Hello?..." From 8501945f80282516179307dfee015f2e7fc48f48 Mon Sep 17 00:00:00 2001 From: zozu Date: Tue, 23 Apr 2013 19:14:52 +0200 Subject: [PATCH 3/4] Fixing the indentation for the fweakout() function --- socode.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/socode.py b/socode.py index 34b54dc..c11d914 100755 --- a/socode.py +++ b/socode.py @@ -176,11 +176,8 @@ def jontonsoup(): print "There's always one more bug." def fweakout(x): - print "Just following the rules!" - for i in range(2,int(x**0.5)+1): - if x % i == 0: - return False - return True + print "Hello, is it me you're looking for?" + #adding code later def monsdar(): print "Hello?..." From 267fd518327edaa485c435a927cfe011dab2ebb8 Mon Sep 17 00:00:00 2001 From: zozu Date: Tue, 23 Apr 2013 19:19:22 +0200 Subject: [PATCH 4/4] Added small priming function to fweakout() --- socode.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/socode.py b/socode.py index c11d914..1cb1b49 100755 --- a/socode.py +++ b/socode.py @@ -177,7 +177,11 @@ def jontonsoup(): def fweakout(x): print "Hello, is it me you're looking for?" - #adding code later + #simple prime function + for i in range(2,int(x**0.5)+1): + if x % i == 0: + return False + return True def monsdar(): print "Hello?..."