Permalink
Browse files

Correctly (i hope) accept all answer permutations and add a TODO to d…

…o it better


fix #43280; fix #43228; fix #42415

Test plan: Answer -(x-1)(5x+2) for http://localhost:8000/exercises/factoring_polynomials_by_grouping_1.html?seed=177&problem=0&debug

Auditors: cbhl, alpert
  • Loading branch information...
beneater committed Mar 14, 2013
1 parent cb30e1f commit 064be4dcd97837c711d32923e824139bd9e342c2
Showing with 9 additions and 8 deletions.
  1. +9 −8 exercises/factoring_polynomials_by_grouping_1.html
@@ -32,6 +32,7 @@
<span id="question-c"><code><var>C</var></code></span>
</p>
<div class="solution" data-type="set">
+ <!-- TODO(eater): Add a magical helper thing that assembles all these permutations automatically -->
<div class="set-sol" data-type="regex">^\s*<var>AX_PLUS_E</var>\s*<var>X_PLUS_F</var>\s*$</div>
<div class="set-sol" data-type="regex">^\s*<var>AX_PLUS_E</var>\s*<var>F_PLUS_X</var>\s*$</div>
<div class="set-sol" data-type="regex">^\s*<var>E_PLUS_AX</var>\s*<var>X_PLUS_F</var>\s*$</div>
@@ -56,14 +57,14 @@
<div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_F_MINUS_X</var>\s*<var>AX_PLUS_E</var>\s*$</div>
<div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_X_MINUS_F</var>\s*<var>E_PLUS_AX</var>\s*$</div>
<div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_F_MINUS_X</var>\s*<var>E_PLUS_AX</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_AX_MINUS_E</var>\s*<var>X_PLUS_F</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_AX_MINUS_E</var>\s*<var>F_PLUS_X</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_E_MINUS_AX</var>\s*<var>X_PLUS_F</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_E_MINUS_AX</var>\s*<var>F_PLUS_X</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_X_MINUS_F</var>\s*<var>AX_PLUS_E</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_F_MINUS_X</var>\s*<var>AX_PLUS_E</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_X_MINUS_F</var>\s*<var>E_PLUS_AX</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>NEG_F_MINUS_X</var>\s*<var>E_PLUS_AX</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>X_PLUS_F</var>\s*<var>NEG_AX_MINUS_E</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>F_PLUS_X</var>\s*<var>NEG_AX_MINUS_E</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>X_PLUS_F</var>\s*<var>NEG_E_MINUS_AX</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>F_PLUS_X</var>\s*<var>NEG_E_MINUS_AX</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>AX_PLUS_E</var>\s*<var>NEG_X_MINUS_F</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>AX_PLUS_E</var>\s*<var>NEG_F_MINUS_X</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>E_PLUS_AX</var>\s*<var>NEG_X_MINUS_F</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*[-\u2212]\s*<var>E_PLUS_AX</var>\s*<var>NEG_F_MINUS_X</var>\s*$</div>
<div class="input-format"><span class="entry"></span></div>
<div class="example">a factored expression, like <b>(2x+1)(x+2)</b></div>
</div>

0 comments on commit 064be4d

Please sign in to comment.