mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-19 21:19:47 +00:00
Update absMin.py
This commit is contained in:
parent
aa11f16a42
commit
70a6d98e0f
@ -6,7 +6,7 @@ def absMin(x):
|
||||
>>absMin([3,-10,-2])
|
||||
-2
|
||||
"""
|
||||
j = x[0]
|
||||
j = absVal(x[0])
|
||||
for i in x:
|
||||
if absVal(i) < j:
|
||||
j = i
|
||||
|
Loading…
x
Reference in New Issue
Block a user