Q. Fill in the blanks in the following code segment to implement sequential search of the given array. The method should return a Boolean value indicating whether or not the parameter value was found in the array.
def seqSearch( s ) :
a = [9, 12, 14, 3, 25 ]
for i in ____ :
if _____ :
return ____
return ____
Answer =
def seqSearch( s ) :
a = [9, 12, 14, 3, 25]
for i in a :
if s == i :
return True
return False
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )