Python/Maths/FindMin.py

13 lines
246 B
Python
Raw Normal View History

def main():
def findMin(x):
minNum = x[0]
for i in x:
if minNum > i:
minNum = i
return minNum
2018-10-28 21:23:29 +00:00
print(findMin([0,1,2,3,4,5,-3,24,-56])) # = -56
if __name__ == '__main__':
main()