Skip to content

Commit 991abb2

Browse files
committed
Added findMin
1 parent dd8e2af commit 991abb2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Maths/FindMin.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def findMin(x):
2+
minNum = x[0]
3+
for i in x:
4+
if minNum > i:
5+
minNum = i
6+
return minNum
7+
8+
print(findMin([0,1,2,3,4,5,-3,24,-56])) # = -56

0 commit comments

Comments
 (0)