Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
49
def
binary(n, digits=20):
50
b = bin(n)[2:]
51
b =
'0'
* (digits - len(b)) + b
52
return
b
53
54
55
def
is_prime(n):
Callers
nothing calls this directly
Calls
1
bin
Function · 0.85
Tested by
no test coverage detected