Question: how can you write a function that given a list, returns both the minimum and maximum values in the list. Your main program should allow

how can you write a function that given a list, returns both the minimum and maximum values in the list. Your main program should allow the user to enter space-separated numbers as test lists, until a blank line is entered.

Output should look like this:

List: 3 6 9 2 4 6

min = 2, max = 9

List: 7

min = 7, max = 7 List:

Please note has to use a custom function.

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 Programming Questions!