Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (33 sloc) 1.47 KB
<!DOCTYPE html>
<html data-require="math word-problems">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Composite numbers</title>
<script src="../khan-exercise.js"></script>
<div class="exercise">
<div class="vars">
<var id="COMPOSITE">rand( 5 ) === 0 ? getEvenComposite() : getOddComposite()</var>
<var id="PRIMES">shuffle( primes, 4 )</var>
<var id="CHOICES">shuffle( PRIMES.concat([ COMPOSITE ]) )</var>
<div class="problems">
<p class="question">Which of these numbers is composite?</p>
<p><code>\large{<var>CHOICES.join( ",\\ " )</var>}</code></p>
<p class="solution"><code><var>COMPOSITE</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 composite number is a number that has more than two factors (including 1 and itself).</p>
<p><var>toSentence( _.filter( CHOICES, function( p ) { return p !== COMPOSITE; } ) )</var> each have only two factors.</p>
<p>The factors of <var>COMPOSITE</var> are <var>toSentence( getFactors( COMPOSITE ) )</var>.</p>
<p>Thus, <var>COMPOSITE</var> is the composite number.</p>
Jump to Line
Something went wrong with that request. Please try again.