Question
Write down the following functions in wolfram mathematica: 1) Write a function that takes a list of values and a minimum value, and returns a
Write down the following functions in wolfram mathematica:
1) Write a function that takes a list of values and a minimum value, and returns a list of all of the values greater than or equal to that minimum value. Here is a test with sample output:
2) Modify your function so that it takes a minimum value and a maximum value, and returns all values between the minimum and the maximum (i.e., all values greater than or equal to the minimum and less than or equal to the maximum). Here is a test case to try: function[{1, 3, 8, 4, 6, 2, 10, 7}, 4, 7] {4, 6, 7}
3) Modify your function so that it will take a list of ordered pairs, and return just the pairs whose first value is greater than or equal to a given minimum and less than or equal to a given maximum value. Here is a test case to try: function5c[{{11, 3}, {3, 8}, {4, 7}, {6, 2}, {7, 4}, {10, 6}}, 4, 7] {{4, 7}, {6, 2}, {7, 4}}
4) Modify your function so that it returns just the second element in the pairs whose first element is within the given range. function5d[{{11, 3}, {3, 8}, {4, 7}, {6, 2}, {7, 4}, {10, 6}}, 4, 7] {7, 2, 4}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started