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
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