Permalink
Browse files

Fix two with combining_like_terms_2:

Summary:
In the ax_fbx_fd problem type, the variable coefficient could simplify to 0
and require entering "0x+5" instead of just "5", for example. Added a data-ensure
to ensure the coefficient is always non-zero.

Also, the final hint in the eax_ec_fd_fbx problem type left off the constant
term unless it was 0 instead of the other way around.

Test Plan:
Test locally to verify the two problems were fixed in these two seeds:
http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/combining_like_terms_2.html?seed=62&problem=ax_fbx_fd&debug
http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/combining_like_terms_2.html?seed=42&problem=eax_ec_fd_fbx&debug

Reviewers: stephanie, yunfangjuan

Reviewed By: stephanie

Differential Revision: http://phabricator.khanacademy.org/D843
  • Loading branch information...
1 parent ad118f8 commit 50f2d07b6320c8f87b8e4ff04ae69e27e6df5f3e @beneater beneater committed Oct 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 exercises/combining_like_terms_2.html
@@ -10,7 +10,7 @@
<div class="exercise" data-weight="1" data-name="combining_like_terms_1"></div>
<div class="exercise" data-weight="6">
- <div class="vars" data-ensure="E * A + F * B !== 0 && E * C + F * D !== 0">
+ <div class="vars" data-ensure="E * A + F * B !== 0 && E * C + F * D !== 0 && A + (F * B) !== 0">
<var id="X">randFromArray("abkmnpvx")</var>
<var id="A">randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12))</var>
<var id="B" data-ensure="abs( A ) !== abs( B )">randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12))</var>
@@ -326,7 +326,7 @@
\blue{<var>E * C + F * D</var>}</code>
</p>
</div>
- <p data-if="E * C + F * D">The simplified expression is <code><var>expr(["*", E * A + F * B, X])</var></code>
+ <p data-if="E * C + F * D === 0">The simplified expression is <code><var>expr(["*", E * A + F * B, X])</var></code>
<p data-else>The simplified expression is <code><var>expr(["+", ["*", E * A + F * B, X], E * C + F * D])</var></code>
</div>
</div>

0 comments on commit 50f2d07

Please sign in to comment.