<span>arts, audio-video technology & communications</span>
Answer:
A linear search is one that scans every record/file until it discovers the value being searched for.
Binary search, on the other hand, is also known as <em>Logarithmic search</em>. It is used to locate the position of a value inside an array that has already been sorted.
The linear search will return the lowest value faster than the binary search when small arrays are involved.
This will only be feasible when the array is sorted prior.
Cheers!
favorite_color = input("Enter favorite color:\n")
pet = input("Enter pet's name:\n")
num = input("Enter a number:\n")
print("You entered: "+favorite_color+" "+pet+" "+num)
password1 = favorite_color+"_"+pet
password2 = num+favorite_color+num
print("First password: "+password1)
print("Second password: "+password2)
print("Number of characters in "+password1+": "+str(len(password1)))
print("Number of characters in "+password2+": "+str(len(password2)))
This works for me.