Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 39 lines (35 sloc) 1.527 kB
af417c3 @marcia Add prime numbers
marcia authored
1 <!DOCTYPE html>
2fb1289 @spicyj toSentence helper to join arrays with a conjunction
spicyj authored
2 <html data-require="math word-problems">
af417c3 @marcia Add prime numbers
marcia authored
3 <head>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Prime numbers</title>
6 <script src="../khan-exercise.js"></script>
af417c3 @marcia Add prime numbers
marcia authored
7 </head>
8 <body>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
9 <div class="exercise">
10 <div class="vars" data-ensure="WRONG_1 !== WRONG_2 && WRONG_2 !== WRONG_3">
11 <var id="PRIME">getPrime()</var>
12 <var id="WRONG_1">getOddComposite()</var>
13 <var id="WRONG_2">getOddComposite()</var>
14 <var id="WRONG_3">getOddComposite()</var>
15 <var id="WRONG_4">getEvenComposite()</var>
25e5b1a @marcia Show prime number hints in same order as multiple choice, maybe fix #…
marcia authored
16
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
17 <var id="CHOICES">shuffle( [ PRIME, WRONG_1, WRONG_2, WRONG_3, WRONG_4 ] )</var>
18 </div>
af417c3 @marcia Add prime numbers
marcia authored
19
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
20 <div class="problems">
21 <div>
22 <p class="question">Which of these numbers is prime?</p>
23 <p><code>\large{<var>CHOICES.join( ",\\ " )</var>}</code></p>
24 <p class="solution"><code><var>PRIME</var></code></p>
25 <ul class="choices" data-category="true">
26 <li data-each="CHOICES as CHOICE"><code><var>CHOICE</var></code></li>
27 </ul>
28 </div>
29 </div>
af417c3 @marcia Add prime numbers
marcia authored
30
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
31 <div class="hints">
32 <p>A prime number has exactly two factors: 1 and itself.</p>
33 <p data-each="CHOICES as CHOICE">The factors of <var>CHOICE</var> are <var>toSentence( getFactors( CHOICE ) )</var>.</p>
34 <p>Thus, <var>PRIME</var> is a prime number.</p>
35 </div>
36 </div>
af417c3 @marcia Add prime numbers
marcia authored
37 </body>
cf02179 @spicyj Strip trailing whitespace
spicyj authored
38 </html>
Something went wrong with that request. Please try again.