MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / isprime

Function isprime

project_euler/problem_07/sol2.py:2–6  ·  view source on GitHub ↗
(number)

Source from the content-addressed store, hash-verified

1# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime number?
2def isprime(number):
3 for i in range(2,int(number**0.5)+1):
4 if number%i==0:
5 return False
6 return True
7n = int(input('Enter The N\'th Prime Number You Want To Get: ')) # Ask For The N'th Prime Number Wanted
8primes = []
9num = 2

Callers 1

sol2.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected