I need to declare a list of ordered pairs, and with it I need to declare a function of two variables, say x and y, and print the ordered pairs giving the maximum and the minimum value on the function.
For example, suppose the list is
L = {{1, 2}, {5, 3}, {9, 2}}
and the function is
2 x + y
With {x, y} = {1, 2}, I will get 4 , with {5, 3}, 13, and with {9, 2}, 20 . Then I need to print {1, 2} and {9, 2} as the result.
Can anyone help me with it please? I don't know how to write it!
Comments
Post a Comment