I just started to learn how to program and I was trying to make a program to find the nth prime number. And I did it. But it takes a very long time for large number. Is there a way to make it faster? Here's the code I used(it's really basic):
def prime_finder(nth1):
s = 1
n = 0
while n < nth1:
s += 1
for x in range(2,s):
if s % x == 0:
break
else:
n += 1
return s
print prime_finder(31337)