Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions

Question

Define organization development (OD) and large-group interventions.

Answered: 1 week ago