mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-20 19:42:45 +08:00
refactor
This commit is contained in:
12
maths/Find_Min.py
Normal file
12
maths/Find_Min.py
Normal file
@ -0,0 +1,12 @@
|
||||
def main():
|
||||
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
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Reference in New Issue
Block a user