Last active
February 14, 2022 16:49
-
-
Save pratik-choudhari/76630b68779ae2a919968f439a818970 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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