Question: Can someone help me write a code? Use the Min/Max pattern to write the function minimum function. This function consumes a list of numbers and

Can someone help me write a code? Use the Min/Max pattern to write the function minimum function. This function consumes a list of numbers and returns the lowest number in the list. Call the function on a list of numbers and print the result. I don't quite understand loops but I need to use one.

I'm assuming it would be something like this:

def minimum(a_list):

result = 0

for item in a_list:

if item < 100:

result = result + 1

print(result)

But I'm unsure how to alter the code so it takes the first number on the list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!