Skip to content

Instantly share code, notes, and snippets.

@pratik-choudhari
Last active February 14, 2022 16:49
Show Gist options
  • Select an option

  • Save pratik-choudhari/76630b68779ae2a919968f439a818970 to your computer and use it in GitHub Desktop.

Select an option

Save pratik-choudhari/76630b68779ae2a919968f439a818970 to your computer and use it in GitHub Desktop.
def nth_prime_number(n):
primes = 1
num = 2
while primes <= n:
mod = 1
ptrue = True
while mod < (num - 1):
if num%(num-mod) == 0:
ptrue = False
break
mod += 1
if ptrue == True:
primes += 1
return(num)
job = task_queue.enqueue(nth_prime_number, kwargs={"n": 106})
print(job.id, job.enqueued_at)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment