No longer accept answers with a negative denominator #43528

Merged
merged 1 commit into from Mar 19, 2013

Conversation

Projects
None yet
2 participants
Member

petercollingridge commented Mar 19, 2013

Make @spicyj happy.

Member

petercollingridge commented Mar 19, 2013

And fix Issue #43485

@petercollingridge petercollingridge added a commit that referenced this pull request Mar 19, 2013

@petercollingridge petercollingridge Merge pull request #43528 from petercollingridge/non-neg-denom
No longer accept answers with a negative denominator

fix #43485; and keep Alpert happy.

Test plan: Test exercises http://localhost:8000/exercises/simplifying_rational_expressions_2.html and make sure it still accepts the correct answer whilst rejecting answers with negated denominator and numerator.

Auditors: alpert
086ffe6

@petercollingridge petercollingridge merged commit 086ffe6 into Khan:master Mar 19, 2013

Member

petercollingridge commented Mar 19, 2013

How long before someone complains that it doesn't accept the negative version of an answer?

Contributor

cbhl commented Mar 19, 2013

Well, we could add a hint for that case, but I worry that would make this answer type too complicated. The regular expressions we're using already make my head hurt, and it's not getting any better.

Member

petercollingridge commented Mar 19, 2013

The previous code already had the regex for the negative answer, but it would be tricky to add to the answer validator. I do think it would be nice to add validators for wrong solutions which would give useful messages (like the the one saying you need to simplify a fraction).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment