Open TRManderson opened 9 years ago
You'll need to update the DESCRIPTION
class attribute on those tests as well.
This pull request would also require changing the tutorial task (in description.html
), as it breaks the stated invariant that the first vertex be at the right angle.
This PR actually fixes the tests to match description.html as previously the first vertex wasn't the right angle.
Oh, whoops...
On 28 April 2015 at 11:21, Tom Manderson notifications@github.com wrote:
This PR actually fixes the tests to match description.html as previously the first vertex wasn't the right angle.
— Reply to this email directly or view it on GitHub https://github.com/CSSE1001/MyPyTutor/pull/161#issuecomment-96870124.
Suggestion (possibly too mean for what already looks like a challenging problem): tweak the alternate test for 'area' so that the vertex list is given clockwise instead of anticlockwise. e.g.
def test_alternate(self):
def _get_results():
t = RightAngledTriangle([(0, 5), (12, 5), (0, 0)])
This would catch students who don't take the absolute value of the distances.
(Edit: clarified which test to tweak)
Actually, now that I've thought about it for another few seconds, the right-angled-triangle area question actually requires some non-trivial geometry if the right angle is not aligned with the x- and y- axes.
[I had an example, but it was wrong, so I'm editing it out. You get the idea.]
Yeah, euclidean distance between each point and the right angle. Not particularly simple.
Hi jgat, I did point this out in an email about this issue (same goes for the rectangles) - dealing with sin/cos is asking way too much - we really want them to "line up with the axises"
I suggest tweaking the problem description (though you might have to deal with students who've already finished the task complaining that it gets made easier after they finish it).
Suggested new version of the task:
RightAngledTriangle
's constructor takes two parameters, which are the two shorter side-lengths of the triangle. e.g. RightAngledTriangle(3, 4).area() == 5
RightAngledTriangle
will always be at the origin).I think this is the way to go - the question wasn't supposed to be about geometry after all
Agreed. It wasn't meant to be difficult.
If this looks like too much of a change for students who've already done it, we could just add the additional constraints in the description and keep the current input spec. (I do prefer jgat's suggestion though.)
On 28 April 2015 at 14:04, Peter Robinson notifications@github.com wrote:
I think this is the way to go - the question wasn't supposed to be about geometry after all
— Reply to this email directly or view it on GitHub https://github.com/CSSE1001/MyPyTutor/pull/161#issuecomment-96904086.
As per emails between Jon/Peter this morning