This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

17 lines
445 B
Python

def LinearSearchNumber():
list1 = [12, 34, 78, 11, 90, 45, 12.4, 34.10, 78.3, 11.5, 90.12, 45.6]
try:
num = float(input('Enter a search value:'))
except Exception:
print('Search value must be int or float')
else:
for i in list1:
if num == i:
print('It exists:', list1.index(i))
return
else:
print("It does not exist")
LinearSearchNumber()