Question: Write a function image(f) that returns the image of the function f. The elements of the image should be sorted in ascending order. For example,

Write a function image(f) that returns the image of the function f. The elements of the image should be sorted in ascending order. For example, calling image(f) with the above variable values should return the list [4, 5]. (Although I try to be consistent with the zyBook. I'm using the term image instead of range here since range is already a built-in Python function.) Python tip: You can sort a list like this: someList = sorted (someList) A = [1, 2, 3] B = [4, 5] f = [[1, 4], [2, 5], [3, 4]]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
