MCPcopy 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
64def 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
74if __name__ == '__main__':

Callers 1

recipe-576380.pyFile · 0.85

Calls 2

fmt_nFunction · 0.85
ith_primeFunction · 0.85

Tested by

no test coverage detected