Skip to content

Commit c2f2fa8

Browse files
SandersLincclauss
authored andcommitted
Update abs_Min.py (#1004)
* Update abs_Min.py * Create __init__.py * Rename abs_Min.py to abs_min.py * Update abs_min.py
1 parent 5f991f7 commit c2f2fa8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

maths/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

maths/abs_min.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from Maths.abs import absVal
1+
from abs import abs_val
2+
23
def absMin(x):
34
"""
45
# >>>absMin([0,5,1,11])
@@ -8,7 +9,7 @@ def absMin(x):
89
"""
910
j = x[0]
1011
for i in x:
11-
if absVal(i) < absVal(j):
12+
if abs_val(i) < abs_val(j):
1213
j = i
1314
return j
1415

0 commit comments

Comments
 (0)