MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / binary

Function binary

Python/CP_Templates.py:49–52  ·  view source on GitHub ↗
(n, digits=20)

Source from the content-addressed store, hash-verified

47
48
49def binary(n, digits=20):
50 b = bin(n)[2:]
51 b = '0' * (digits - len(b)) + b
52 return b
53
54
55def is_prime(n):

Callers

nothing calls this directly

Calls 1

binFunction · 0.85

Tested by

no test coverage detected