I am not sure what I'm doing wrong, but I keep getting an Index error whenever I try to run the code.
def min_valueinlist(bag = [1,-1,3,4,5,6]):
bag_length= len(bag)
counter = 1
min_value = bag[0]
while counter <= bag_length:
v = bag[counter]
if (v < min_value):
min_value = v
else:
pass
counter=counter+1
return min_value
print(min_valueinlist())
min()function...