You will count the solutions of for any value of , by the method of the lesson. The checker compares your answers with a count made by scanning the numbers on a fine grid.
The idea. Put . The left side becomes . The equation is a quadratic in with the roots , where . Only the roots in give a solution .
Your tasks.
g(t). Return .roots_in_branch(a). Return the sorted list of the roots that lie in . Return an empty list if is below .count_x(a). Return how many solutions there are.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…