mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 23:11:09 +00:00
Added findMin
This commit is contained in:
parent
dd8e2afae6
commit
991abb2402
8
Maths/FindMin.py
Normal file
8
Maths/FindMin.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
def findMin(x):
|
||||||
|
minNum = x[0]
|
||||||
|
for i in x:
|
||||||
|
if minNum > i:
|
||||||
|
minNum = i
|
||||||
|
return minNum
|
||||||
|
|
||||||
|
print(findMin([0,1,2,3,4,5,-3,24,-56])) # = -56
|
Loading…
Reference in New Issue
Block a user