Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ prime_generator
Function
prime_generator
project_euler/problem_007/sol3.py:53–62 ·
view source on GitHub ↗
Generate a sequence of prime numbers
()
Source
from the content-addressed store, hash-verified
51
52
53
def
prime_generator():
54
""
"
55
Generate a sequence of prime numbers
56
""
"
57
58
num = 2
59
while
True:
60
if
is_prime(num):
61
yield
num
62
num += 1
63
64
65
def
solution(nth: int = 10001) -> int:
Callers
1
solution
Function · 0.70
Calls
1
is_prime
Function · 0.70
Tested by
no test coverage detected