diff --git a/participants/scipy_007/doc/README.md b/participants/scipy_007/doc/README.md index a1542d9..79fbcea 100644 --- a/participants/scipy_007/doc/README.md +++ b/participants/scipy_007/doc/README.md @@ -1,11 +1,11 @@ -Ok so I guess you are reading this cuz you wanna use my code. There are some -functions that do stuf and thats: +Ok, so I guess you are reading this cuz you wanna use my code. There are some +functions that do stuff and that's: >>> from simple_functions import factorial >>> factorial(10) 9 -and this other part does something. I forget why that I did it: +and this other part does something. I forget why I did it: >>> fibonnaccci(100) [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] diff --git a/participants/scipy_007/pr_tutorial/simple_functions.py b/participants/scipy_007/pr_tutorial/simple_functions.py index c3dcf8f..43f23db 100644 --- a/participants/scipy_007/pr_tutorial/simple_functions.py +++ b/participants/scipy_007/pr_tutorial/simple_functions.py @@ -10,3 +10,10 @@ def factorial(value): return 1 else: return value * factorial(value - 1) + +def isPrime(n): + for i in range(2,int(n**0.5)+1): + if n%i==0: + return False + + return True