Last active
April 22, 2016 15:19
-
-
Save yuda110/03199af1784902f92334d36c050f4a0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#python3 | |
def is_prime_num(num) : | |
for i in range(2, int(num**0.5) + 1): | |
if num % i==0: | |
return False | |
return True | |
def find_prime_num(seq_range_to) : | |
num = 3 | |
prime_seq = 1 | |
prime_num = 0 | |
while prime_seq < seq_range_to : | |
if is_prime_num(num) == True : | |
prime_seq += 1 | |
prime_num = num | |
num += 2 | |
return prime_num | |
print(find_prime_num(10001)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment