CSSE1001 / MyPyTutor

Interactive tutorial application for Python3.
Other
7 stars 12 forks source link

Fixed right angled triangle side ordering for area #161

Open TRManderson opened 9 years ago

TRManderson commented 9 years ago

As per emails between Jon/Peter this morning

sapi commented 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.

TRManderson commented 9 years ago

This PR actually fixes the tests to match description.html as previously the first vertex wasn't the right angle.

sapi commented 9 years ago

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.

jgat commented 9 years ago

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)

jgat commented 9 years ago

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.]

TRManderson commented 9 years ago

Yeah, euclidean distance between each point and the right angle. Not particularly simple.

pjritee commented 9 years ago

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"

jgat commented 9 years ago

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:

pjritee commented 9 years ago

I think this is the way to go - the question wasn't supposed to be about geometry after all

sapi commented 9 years ago

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.