I have a python 3.x program that is producing an error:
def main():
names = [\'Ava Fischer\', \'Bob White\', \'Chris Rich\', \'Danielle Porter\',
Kinda late to the party but you could also use:
middle = int((first + last) / 2)
In any case why you are getting your error is perfectly explained in RocketDonkey answer.
For your code to work you should also set:
position = binary_search(names, entered)
as Hugo Ferreira mentioned.
Also check this question: What is the difference between '/' and '//' when used for division?