# Khan/khan-exercises

```Summary: Added a capitalize function to word problems that capitalizes a string

Reviewers: eater

Reviewed By: eater

1 parent 49acfef commit 9d9ca185309685bf7b1acedcab2d3bec66051ba9 xymostech committed May 25, 2012
Showing with 147 additions and 0 deletions.
1. +143 −0 exercises/logical_arguments_deductive_reasoning.html
2. +4 −0 utils/word-problems.js
 @@ -0,0 +1,143 @@ + + + + + Logical arguments and deductive reasoning + + + +
+
+
+
+ + [[person(1)+" misses the bus", he(1)+" will be late for school", + [person(1)+" missed the bus", + person(1)+" is late for school", + person(1)+" did not miss the bus", + person(1)+" is not late for school"]], + ["it is Tuesday", "I will have a hamburger for lunch", + ["it is Tuesday", + "I will have a hamburger for lunch today", + "it is not Tuesday", + "I will not have a hamburger for lunch today"]], + ["Wiggles are walking", "Tiggles are talking", + ["Wiggles are walking", + "Tiggles are talking", + "Wiggles are not walking", + "Tiggles are not talking"]], + ["I go to practice today", "I will play in the game tomorrow", + ["I went to practice today", + "I will play in the game tomorrow", + "I did not go to practice today", + "I will not play in the game tomorrow"]]] + + randRange(0, QUESTIONS.length - 1) + QUESTIONS[Q_TYPE][0] + QUESTIONS[Q_TYPE][1] + randRange(0, 3) + QUESTIONS[Q_TYPE][2] + [IMPLICATION[1], IMPLICATION[0], IMPLICATION[3], IMPLICATION[2]] + (TYPE === 1 || TYPE === 2) ? "No logical conclusion possible" : CONCLUSION[TYPE] +
+

Use the given information to make a logical conclusion, if possible. If a logical conclusion is not possible, choose "no logical conclusion possible."

+

If IF_CLAUSE, then THEN_CLAUSE. capitalize(IMPLICATION[ TYPE ]).

+

SOLUTION

+
+
• capitalize(CONCLUSION[TYPE])
• +
• No logical conclusion possible
• +
+
+
+

Identify the hypothesis, the conclusion of the first sentence, and the second sentence.

+
+
+

Does the second sentence refer to the hypothesis of the first sentence, or the conclusion of the first sentence?

+
+

The second sentence refers to the hypothesis of the first sentence, because they both talk about whether or not IMPLICATION[0].

+

Does the second sentence state the hypothesis, or the opposite of the hypothesis?

+
+
+

The second sentence refers to the conclusion of the first sentence, because they both talk about whether or not IMPLICATION[1].

+

Does the second sentence state the conclusion, or the opposite of the conclusion?

+
+
+

The second sentence states the hypothesis of the first sentence.

+

Because the second sentence states the hypothesis of the first sentence, the second sentence implies the first sentence.

+

Since we are implying the original statement, we can conclude the conclusion of the first statement.

+
+
+

The second sentence states the conclusion of the first sentence.

+

Because the second sentence states the conclusion of the first sentence, the second sentence implies the converse of the first sentence.

+

Converses are not logically equivalent to their original statements, so we cannot form a logical conclusion.

+
+
+

The second sentence states the opposite of the hypothesis of the first sentence.

+

Because the second sentence states the opposite of the hypothesis of the first sentence, the second sentence implies the inverse of the first sentence.

+

Inverses are not logically equivalent to their original statements, so we cannot form a logical conclusion.

+
+
+

Because the second sentence states the opposite of the conclusion of the first sentence, the second sentence implies the contrapositive of the first sentence.

+

Since the contrapositive is implied by the first sentence, the second sentence implies the opposite of the hypothesis.

+
+

+
+
+
+
+ + [[true, true, ["a figure is a square", "it is a rectangle", "a figure is a rectangle", "it has four right angles"]], + [false, true, ["you play basketball", "you are athletic", "you play volleyball", "you are athletic"]], + [true, true, ["it is Saturday", "you don't have to go to school", "you don't have to go to school", "you can play in the park"]], + [false, true, ["you live in Los Angeles", "you live in California", "you live in Sacremento", "you live in California"]], + [true, true, ["a ray bisects an angle", "it creates two congruent angles", "there are two congruent angles", "the two angles have the measure"]], + [false, false, ["a shape is a pentagon", "the shape has five sides", "a shape is a pentagon", "the shape has five angles"]], + [true, true, ["a student is in the twelfth grade", "he or she is in high school", "a student is in high school", "he or she is not in college"]], + [false, true, ["you have a picnic", "you will see ants", "it rains a lot", "you will see ants"]]] + randRange(0, QUESTIONS.length - 1) + QUESTIONS[Q_TYPE][0] + QUESTIONS[Q_TYPE][1] + QUESTIONS[Q_TYPE][2][0] + QUESTIONS[Q_TYPE][2][1] + QUESTIONS[Q_TYPE][2][2] + QUESTIONS[Q_TYPE][2][3] + CONC_POSSIBLE ? ("If "+HYP_A+", then "+CONC_B+".") : "No logical conclusion possible." +
+

Use the given information to make a logical conclusion, if possible.

+

If HYP_A, then CONC_A. If HYP_B, then CONC_B.

+

SOLUTION

+
+
• If HYP_A, then CONC_B.
• +
• If HYP_A, then HYP_B.
• +
• If CONC_A, then CONC_B.
• +
• No logical conclusion possible.
• +
+
+
+

Identify the first hypothesis, the first conclusion, the second hypothesis, and the second conclusion.

+
+ \$( "#hyp_a" ).addClass( "hint_blue" ); + \$( "#conc_a" ).addClass( "hint_green" ); + \$( "#hyp_b" ).addClass( "hint_red" ); + \$( "#conc_b" ).addClass( "hint_purple" ); +
+
+
+

Do the two sentences come in the form "If P, then Q. If Q, then R", where first conclusion and second hypothesis are the same?

+

In other words, do the sentences look like \blue{P}\implies \green{Q}. \red{Q}\implies \purple{R}?

+
+
+

Yes. Because the middle two statements both say HYP_B, we can chain the statements together: \blue{P}\implies\green{Q}\implies\purple{R} or "HYP_A"\implies"CONC_A"\implies"CONC_B".

+

We can now remove the middle statement, and arrive at the conclusion "HYP_A"\implies"CONC_B". So, the answer is "If HYP_A, then CONC_B."

+
+

No. So, we cannot form a logical conclusion.

+
+
+
+
+ +
 @@ -33,6 +33,10 @@ \$.extend(KhanUtil, { return KhanUtil.toSentence(wrapped, conjunction); }, + capitalize: function(str) { + return str.charAt(0).toUpperCase() + str.slice(1); + }, + // pluralization helper. There are five signatures // - plural(NUMBER): return "s" if NUMBER is not 1 // - plural(NUMBER, singular):