Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ do_input
Function
do_input
recipes/Python/576380_Prime_look_up_program/recipe-576380.py:64–71 ·
view source on GitHub ↗
(s)
Source
from the content-addressed store, hash-verified
62
63
64
def
do_input(s):
65
try
:
66
i = int(s)
67
68
except
ValueError:
69
i = len(primes) + 1
70
71
print
'Prime[%s] = %s.'
% (fmt_n(i), fmt_n(ith_prime(i)))
72
73
74
if
__name__ ==
'__main__'
:
Callers
1
recipe-576380.py
File · 0.85
Calls
2
fmt_n
Function · 0.85
ith_prime
Function · 0.85
Tested by
no test coverage detected