Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ findClosestNumberr.py
File
findClosestNumberr.py
Python/findClosestNumberr.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
def
get_closest(val1, val2, t):
2
if
abs(val1 - t) <= abs(val2 - t):
3
return
val1
4
else
:
Callers
nothing calls this directly
Calls
2
find_closest
Function · 0.85
print
Function · 0.50
Tested by
no test coverage detected