Skip to content

# Khan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Newer
Older
100644 39 lines (35 sloc) 1.299 kb
 af417c3 Add prime numbers marcia authored May 17, 2011 1 2fb1289 toSentence helper to join arrays with a conjunction spicyj authored May 26, 2011 2 af417c3 Add prime numbers marcia authored May 17, 2011 3 65eec09 Content-Type meta tag for libxml2 compatibility spicyj authored Jan 4, 2012 4 07d95d3 Rename EVERYTHING; closes #323. spicyj authored Jul 22, 2011 5 Prime numbers 190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 6 af417c3 Add prime numbers marcia authored May 17, 2011 7 8 190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 9
25e5b1a Show prime number hints in same order as multiple choice, maybe fix #296... marcia authored Sep 21, 2011 10
190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 11 getPrime() 12 getOddComposite() 13 getOddComposite() 14 getOddComposite() 15 getEvenComposite() 25e5b1a Show prime number hints in same order as multiple choice, maybe fix #296... marcia authored Sep 21, 2011 16 17 shuffle( [ PRIME, WRONG_1, WRONG_2, WRONG_3, WRONG_4 ] ) 190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 18
af417c3 Add prime numbers marcia authored May 17, 2011 19 190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 20
21
22

Which of these numbers is prime?

25e5b1a Show prime number hints in same order as multiple choice, maybe fix #296... marcia authored Sep 21, 2011 23

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

24

PRIME

25
26
• CHOICE
• 190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 27
28
29
af417c3 Add prime numbers marcia authored May 17, 2011 30 190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 31
32

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

25e5b1a Show prime number hints in same order as multiple choice, maybe fix #296... marcia authored Sep 21, 2011 33

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

190610b Retool framework, move Math and Graph logic out of khan-exercise.js and ... jeresig authored May 18, 2011 34

Thus, PRIME is a prime number.

35
36
af417c3 Add prime numbers marcia authored May 17, 2011 37 cf02179 Strip trailing whitespace spicyj authored Jun 1, 2011 38
Something went wrong with that request. Please try again.