Example in Searching bootcamp

#1

I’m trying to understand the bisect_left example on page 146 (Python version).

  1. Why is it necessary to pass comp_gpa func into the search_student func?

  2. What is passed in to the parameter ‘target’ for search_student? Shouldn’t the target be a float (GPA)?

  3. Why is a boolean returned? Shouldn’t this be the index i?

Thx

0 Likes