import random numArray = [0]*10 #create an array/list of 10 elements for i in range(len(numArray)): #len(numArray) is the same as 10 #populate the array numArray[i] = random.randint(1,20) #display the contents print(f"numArray[{i}] : {numArray[i]}") i = 0 #loop control variable searchItem = int(input("Enter a search item: ")) #start of linear search while numArray[i] != searchItem: i++ #end of linear search if i == len(numArray): print(f"{searchItem} is not in the array!") else: print(f"{searchItem} is in the array!")