Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Add last hint for x/ negative #s exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
marcia committed Jun 3, 2011
1 parent 5a19b0a commit 882c064
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions exercises/multiplying_and_dividing_negative_numbers.html
Expand Up @@ -7,37 +7,31 @@
<body>
<div class="exercise">
<div class="vars" data-ensure="(A < 0 || B < 0) && B != 0">
<var id="A">rand(18) - 9</var>
<var id="B">rand(18) - 9</var>
<var id="A">rand( 18 ) - 9</var>
<var id="B">rand( 18 ) - 9</var>
<var id="C">A * B</var>
</div>

<div class="problems">
<div id="multiplying">
<p class="question"><var>A</var> x <var>B</var> = ?</p>
<div class="solution"><var>A * B</var></div>
<p class="question"><code><var>A</var> \times <var>B</var> = </code> ?</p>
<div class="solution"><var>C</var></div>
<div class="hints">
<p data-if="A<0 && B<0">
A negative times a negative is a positive.
</p><p data-else data-if="A<0">
A negative times a positive is a negative.
</p><p data-else>
A positive times a negative is a negative.
</p>
<p data-if="A < 0 && B < 0">A negative times a negative is a positive.</p>
<p data-else data-if="A < 0">A negative times a positive is a negative.</p>
<p data-else>A positive times a negative is a negative.</p>
<p><code><var>A</var> \times <var>B</var> = <var>C</var></code></p>
</div>
</div>

<div id="dividing">
<p class="question"><var>C</var> / <var>B</var> = ?</p>
<div class="solution"><var>C / B</var></div>
<p class="question"><code><var>C</var> \div <var>B</var> = </code> ?</p>
<div class="solution"><var>A</var></div>
<div class="hints">
<p data-if="C<0 && B<0">
A negative divided by a negative is a positive.
</p><p data-else data-if="C<0">
A negative divided by a positive is a negative.
</p><p data-else>
A positive divided by a negative is a negative.
</p>
<p data-if="C < 0 && B < 0">A negative divided by a negative is a positive.</p>
<p data-else data-if="C < 0">A negative divided by a positive is a negative.</p>
<p data-else>A positive divided by a negative is a negative.</p>
<p><code><var>C</var> \div <var>B</var> = <var>A</var></code></p>
</div>
</div>
</div>
Expand Down

0 comments on commit 882c064

Please sign in to comment.