Created
August 30, 2020 09:19
-
-
Save tiwarinaman/9075fbc5e303efd7b2db2667833c37b5 to your computer and use it in GitHub Desktop.
Sequential search in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def binary_search(list,data): | |
| for i in list: | |
| if i==data: | |
| print("Data is present") | |
| break | |
| else: | |
| print("Not found") | |
| list=[32,33,41,35,67,54,3,5,44,3,2] | |
| data = int(input('What you want to search :: ')) | |
| binary_search(list,data) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment