# Khan/khan-exercises

Show prime number hints in same order as multiple choice, maybe fix #…

`…2962`
marcia committed Sep 21, 2011
1 parent da42824 commit 25e5b1a83a6643d897210d44d496750334f2ceeb
Showing with 8 additions and 21 deletions.
1. +8 −21 exercises/prime_numbers.html
 @@ -7,43 +7,30 @@
-
+
getPrime() - toSentence( getFactors( PRIME ) ) - getOddComposite() - toSentence( getFactors( WRONG_1 ) ) - getOddComposite() - toSentence( getFactors( WRONG_2 ) ) - getOddComposite() - toSentence( getFactors( WRONG_3 ) ) - getEvenComposite() - toSentence( getFactors( WRONG_4 ) ) + + shuffle( [ PRIME, WRONG_1, WRONG_2, WRONG_3, WRONG_4 ] )

Which of these numbers is prime?

-

PRIME

-
-
• WRONG_1
• -
• WRONG_2
• -
• WRONG_3
• -
• WRONG_4
• +

\large{CHOICES.join( "," )}

+

PRIME

+
+
• CHOICE

A prime number has exactly two factors: 1 and itself.

-

The factors of WRONG_1 are WRONG_1_FACTORS.

-

The factors of WRONG_2 are WRONG_2_FACTORS.

-

The factors of WRONG_3 are WRONG_3_FACTORS.

-

The factors of WRONG_4 are WRONG_4_FACTORS.

-

The factors of PRIME are PRIME_FACTORS.

+

The factors of CHOICE are toSentence( getFactors( CHOICE ) ).

Thus, PRIME is a prime number.