mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 16:27:02 +00:00
Update abs_Min.py (#1004)
* Update abs_Min.py * Create __init__.py * Rename abs_Min.py to abs_min.py * Update abs_min.py
This commit is contained in:
parent
5f991f7740
commit
c2f2fa8b23
1
maths/__init__.py
Normal file
1
maths/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from Maths.abs import absVal
|
||||
from abs import abs_val
|
||||
|
||||
def absMin(x):
|
||||
"""
|
||||
# >>>absMin([0,5,1,11])
|
||||
|
@ -8,7 +9,7 @@ def absMin(x):
|
|||
"""
|
||||
j = x[0]
|
||||
for i in x:
|
||||
if absVal(i) < absVal(j):
|
||||
if abs_val(i) < abs_val(j):
|
||||
j = i
|
||||
return j
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user