Question: using python 1) given a list of values, return a tuples with the minimum and maximum values in the list. Write this code, don't use

using python

1) given a list of values, return a tuples with the minimum and maximum values in the list. Write this code, don't use built in min or max functions

2) given a list of values, return a list that contains only the even numbers from that list. Hint: x % 2 == 0 if x is even

3) Given a list of values, return a different list that has the values in reverse order. Write this code, don't use built list functions

Use this for testing your code

# -------- main ------- a=[3,5,1,2,7,5,2]

print(list(findminmax(a)))

print(getevenlist(a))

print(reverse(a))

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!