Question: Write a python program that creates a list, puts data into the list, and then calls your find function to search for a particular number.

Write a python program that creates a list, puts data into the list, and then calls yourfindfunction to search for a particular number. Yourfindfunctionreceives the following 3 parameters: an integer list, the list size, and a number to search for. This function searches for the number (passed via the third parameter), within the list (passed via the first parameter). If the number is found in the list, the index of the list element where the number was found is returned by the function. If the number is not found, the program returns the value -1.

You decide on the contents and size of the list, and the number to search for. If the number is found in the list, your main program prints "found" to the screen. If it is not found, it prints "not found" to the screen.[

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 Programming Questions!