You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some assertions made about the angles() method of the Triangle class in lecture 5 are possibly wrong, because they don't agree with the specification for the method.
add a method to the Triangle class called angles(). It should return a tuple of three floats, each representing the interior angle in radians of the vertices of the triangle, ordered so that the first angle is at the first vertex of the triangle, and so on.
However, in the assertions, it appears that the angles of the first and second vertices are accidentally swapped.
I appreciate your time into this issue in advance.
Yours truly,
esemsc-df329480 (Guanyuming He)
The text was updated successfully, but these errors were encountered:
It just occurred to me that perhaps you wanted each angle to correspond to an edge, instead of a vertex. Nevertheless, there's some inconsistency with the specification.
Hi @esemsc-df329480, thank you for letting us know. I agree with you that the problem description is a bit vague and can be understood differently. Would you like to suggest to us how you would formulate that question and we can consider including it for the next cohort?
I think your description is good and clear. According to it, the first angle, angles()[0], should be the one at the first vertex, $(0,0)$; and it should be $\pi/2$. The problem is that $\pi/2$ is asserted to be angles()[1] instead.
With that said, however, since each vertex is assigned a name in __init__ ($a$, $b$, and $c$), I can think of a way to make the statement 100% accurate, using mathematical language. For example, we could rephrase the specification of angles() to:
The angles() method should return the tuple $(\angle cab, \angle abc, \angle bca)$, in radians.
Dear Dr Beg,
Some assertions made about the
angles()
method of theTriangle
class in lecture 5 are possibly wrong, because they don't agree with the specification for the method.However, in the assertions, it appears that the angles of the first and second vertices are accidentally swapped.
I appreciate your time into this issue in advance.
Yours truly,
esemsc-df329480 (Guanyuming He)
The text was updated successfully, but these errors were encountered: