Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
linearSearch.py
#python 3.5.2 #Linear Search from array import * arr=array('i',[]) size=int(input("enter size")) for i in range(size): arr.append(int(input("enter next value"))) print("Original array") for i in range(len(arr)): print(arr[i]) search=int(input("enter element to search")) k=0 found=0 for e in arr: if e==search: found=1 break k+=1 if found==1: print(search," found @ ",k) else: print(search," Not found")
run
|
edit
|
history
|
help
0
количество 1 и 0 в последовательности чисел до n
shuru15
Game4
sum of odd numbers
Palindrome using recursion
My Intro
H.W5
Calender 2019
kenken1
gauss elimination determinant calculator