diff options
Diffstat (limited to 'Problem10.py')
-rw-r--r-- | Problem10.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Problem10.py b/Problem10.py new file mode 100644 index 0000000..4af48a5 --- /dev/null +++ b/Problem10.py @@ -0,0 +1,11 @@ +def isPrime(n): + for x in range (2,int(n/2)+1): + if n % x == 0: + return False + return True +sum = 0 +for x in range(2,2000000): + if isPrime(x): + sum += x + print(sum) +k=input("press close to exit")
\ No newline at end of file |