Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (35 sloc) 1.49 KB
<!DOCTYPE html>
<html data-require="math word-problems">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Prime numbers</title>
<script src="../khan-exercise.js"></script>
<div class="exercise">
<div class="vars" data-ensure="WRONG_1 !== WRONG_2 && WRONG_2 !== WRONG_3">
<var id="PRIME">getPrime()</var>
<var id="WRONG_1">getOddComposite()</var>
<var id="WRONG_2">getOddComposite()</var>
<var id="WRONG_3">getOddComposite()</var>
<var id="WRONG_4">getEvenComposite()</var>
<var id="CHOICES">shuffle( [ PRIME, WRONG_1, WRONG_2, WRONG_3, WRONG_4 ] )</var>
<div class="problems">
<p class="question">Which of these numbers is prime?</p>
<p><code>\large{<var>CHOICES.join( ",\\ " )</var>}</code></p>
<p class="solution"><code><var>PRIME</var></code></p>
<ul class="choices" data-category="true">
<li data-each="CHOICES as CHOICE"><code><var>CHOICE</var></code></li>
<div class="hints">
<p>A prime number has exactly two factors: 1 and itself.</p>
<p data-each="CHOICES as CHOICE">The factors of <var>CHOICE</var> are <var>toSentence( getFactors( CHOICE ) )</var>.</p>
<p>Thus, <var>PRIME</var> is a prime number.</p>
Jump to Line
Something went wrong with that request. Please try again.