Question: QUESTION 2. myContains that returns true if elem is in the list and false otherwise is given. >myContains(12,-8,1,3,411) True myContains(12,-8,1,3,410) False myContains(12,-8,1,3,414) True >>> mycontainsi

 QUESTION 2. myContains that returns true if elem is in the

QUESTION 2. myContains that returns true if elem is in the list and false otherwise is given. >myContains(12,-8,1,3,411) True myContains(12,-8,1,3,410) False myContains(12,-8,1,3,414) True >>> mycontainsi 2,4,1,3,49 False Define a function myContainsindex(list,elem) that returns -1 if elem in not in the list. If elem is in the list, the function returns the index of list where elem is found in the list,. For example (compare against above): omyContainsindex([2,-8,1,3,411) myContainsindes12-8.1,3,4L0 xo myContainsindext(2-8,1,3,414) ox myContainslndex(2-8.1.3,415) > myContainsindext12-8.1,3,415) 25 31

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!