Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Chandra checks on the angles . How many angles is that? Some must be skipped because . How many? What is ?
An identity holds for every angle. np.allclose(left, right) tests arrays; np.max(np.abs(left - right)) is the worst miss. One counterexample proves an identity false. Avoid angles where for and . Random angles from rng.uniform(0, 2 * np.pi, n) test an identity everywhere.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. Count. angles, from to .
Step 2. Skip. only at and , both in the list. That is angles.
Step 3. The value. , so . Also .
Answer: angles, skipped, and .
Log in to join the discussion.
Loading…