Question: Write an EASY Python function for performing sequential search for a number in a supplied list. If success returns the position of the element in

Write an EASY Python function for performing sequential search for a number in a supplied list.
If success returns the position of the element in the list; otherwise returns -1. The list need not be ordered.
Create a list using the list() function(s) containing numbers between 0 and 100 using random module functions. Next ask user for a number between 0 and 100 and call the above function to search for the number in the list and print position of the number in the list if found else print error message.

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!