Manually implement a function that finds the smallest value in a list of integers and print it.

def findMin(list): min = list[0] for i in range(1, len(list)): if list[i] < min: min = list[i] print(min)

DH

Related Python Mentoring answers

All answers ▸

What can I do with Python?


Which function is ran when an object is instantiated?


Describe both For-loops and While-loops and explain how you can simulate the effect of a for loop with a while loop with an example.


Give a segment of python code that will print the numbers 1 to 7, each one on a new line