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 be used to iterate through a list in python?


[Exam style] Python is an interpreted language. Explain what this means and how interpreted languages differ from compiled languages.


What is the difference between a for loop and a while loop?


How would you loop over every key and value in a python dictionary?