Linear Search Algorithm
Learn How this program work:
- First we take the input from the user of list of the numbers by using the input() function.
- Then we take the input of element that you want to search by using the input() function.
- Then we assume that the element is not found by flag = 0.
- Then we iterate the list by using for loop.
- Then we check the number is equal to element.
- If element no found then flag = 0 and element found then flag = 1.
- And lastly print the element is found or not.
# Input list from the user