вот правильное
boy_number = int(input('vvedite chislo'))
left_bord = 1
right_bord = 100
attempts = 1
while True:
number = (left_bord + right_bord) // 2
print(number)
boys_answer = int(input('1 — равно 2 — больше 3 — меньше'))
if boys_answer == 1:
print('ugadaL!')
break
elif boys_answer == 2:
left_bord = number
elif boys_answer == 3:
right_bord = number
attempts += 1
print('zatracheno', attempts, 'popitok')