# Khan/khan-exercises

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
388 lines (376 sloc) 18.2 KB
 Linear equation and inequality word problems
randRange(20, 40) randRange(2, 10) randRange(30, 100) ceil((R - Q) / P)

person(1) sells magazine subscriptions and earns $P for every new subscriber he signs up. person(1) also earns a$Q weekly bonus regardless of how many magazine subscriptions he sells.

person(1) sells magazine subscriptions and earns $P for every new subscriber she signs up. person(1) also earns a$Q weekly bonus regardless of how many magazine subscriptions she sells.

If person(1) wants to earn at least $R this week, what is the minimum number of subscriptions he needs to sell? If person(1) wants to earn at least$R this week, what is the minimum number of subscriptions she needs to sell?

subscriptions
[ $("#guessans").val(),$("#firsttext").val(), $("#secondtext").val() ] var correct = X; var solutionDiv =$("<div>").text(correct); var validator = Khan.answerTypes.number.createValidator(solutionDiv); return validator(guess[0]);
if (guess != null) { $("#guessans").val(guess[0]); } else {$("#guessans").val(""); if ($("#firsttext").length > 0) {$("#firsttext").text(""); $("#secondtext").text(""); } } if (guess != null &&$("#firsttext").length > 0) { guess[1] === null ? $("#firsttext").text("") :$("#firsttext").text(guess[1]); guess[2] === null ? $("#secondtext").text("") :$("#secondtext").text(guess[2]); }

To solve this, let's set up an expression to show how much money person(1) will make.

Amount earned this week =
\qquadSubscriptions sold \times Price per subscription + Weekly bonus

Since person(1) wants to make at least $R this week, we can turn this into an inequality. Amount earned this week \geq$R

Subscriptions sold \times Price per subscription + Weekly bonus \geq $R We are solving for the number of subscriptions sold, so let subscriptions sold be represented by the variable x. We can now plug in: x \cdot$P + $Q \geq$R

x \cdot $P \geq$R - $Q x \cdot$P \geq $R - Q x \geq \dfrac{R - Q}{P} \approx localeToFixed((R - Q) / P, 2) Since person(1) cannot sell parts of subscriptions, we round localeToFixed((R - Q) / P, 2) up to X. x \geq \dfrac{R - Q}{P} = (R - Q) / P person(1) must sell at least X subscriptions this week. 10 * randRange(100 / 10, 500 / 10) 10 * randRange(300 / 10, 1000 / 10) 10 * randRange(2000 / 10, 4000 / 10) ceil((R - Q) / P) For every level person(1) completes in his favorite game, he earns P points. person(1) already has Q points in the game and wants to end up with at least R points before he goes to bed. For every level person(1) completes in her favorite game, she earns P points. person(1) already has Q points in the game and wants to end up with at least R points before she goes to bed. Assuming person(1) can only get points by completing levels, what is the minimum number of levels that he needs to complete to reach his goal? Assuming person(1) can only get points by completing levels, what is the minimum number of levels that she needs to complete to reach her goal? levels [$("#guessans").val(), $("#firsttext").val(),$("#secondtext").val() ]
var correct = X; var solutionDiv = $("<div>").text(correct); var validator = Khan.answerTypes.number.createValidator(solutionDiv); return validator(guess[0]); if (guess != null) {$("#guessans").val(guess[0]); } else { $("#guessans").val(""); if ($("#firsttext").length > 0) { $("#firsttext").text("");$("#secondtext").text(""); } }
if (guess != null && $("#firsttext").length > 0) { guess[1] === null ?$("#firsttext").text("") : $("#firsttext").text(guess[1]); guess[2] === null ?$("#secondtext").text("") : $("#secondtext").text(guess[2]); } To solve this, let's set up an expression to show how many points person(1) will have after each level. Number of points = \qquadLevels completed \times Points per level + Starting points Since person(1) wants to have at least R points before going to bed, we can set up an inequality. Number of points \geq R Levels completed \times Points per level + Starting points \geq R We are solving for the number of levels to be completed, so let the number of levels be represented by the variable x. We can now plug in: x \cdot P + Q \geq R x \cdot P \geq R - Q x \cdot P \geq R - Q x \geq \dfrac{R - Q}{P} \approx localeToFixed((R - Q) / P, 2) Since person(1) won't get points unless he completes the entire level, we round localeToFixed((R - Q) / P, 2) up to X. Since person(1) won't get points unless she completes the entire level, we round localeToFixed((R - Q) / P, 2) up to X. x \geq \dfrac{R - Q}{P} = (R - Q) / P person(1) must complete at least X levels. randRange(5, 50) randRange(50, 200) randRange(1, 10) ceil(( R - Q ) / P) To move up to the maestro level in his piano school, person(1) needs to master at least R songs. person(1) has already mastered Q songs. To move up to the maestro level in her piano school, person(1) needs to master at least R songs. person(1) has already mastered Q songs. If person(1) can master P songs per month, what is the minimum number of months it will take him(1) to move to the maestro level? months [$("#guessans").val(), $("#firsttext").val(),$("#secondtext").val() ]
var correct = X; var solutionDiv = $("<div>").text(correct); var validator = Khan.answerTypes.number.createValidator(solutionDiv); return validator(guess[0]); if (guess != null) {$("#guessans").val(guess[0]); } else { $("#guessans").val(""); if ($("#firsttext").length > 0) { $("#firsttext").text("");$("#secondtext").text(""); } }
if (guess != null && $("#firsttext").length > 0) { guess[1] === null ?$("#firsttext").text("") : $("#firsttext").text(guess[1]); guess[2] === null ?$("#secondtext").text("") : \$("#secondtext").text(guess[2]); }

To solve this, let's set up an expression to show how many songs person(1) will have mastered after each month.

Number of songs mastered =
\quadMonths at school \times Songs mastered per month + Songs already mastered

Since person(1) Needs to have at least R songs mastered to move to maestro level, we can set up an inequality to find the number of months needed.

Number of songs mastered \geq R

Months at school \times Songs mastered per month

We are solving for the months spent at school, so let the number of months be represented by the variable x.

We can now plug in:

x \cdot P + Q \geq R

x \cdot P \geq R - Q

x \cdot P \geq R - Q

x \geq \dfrac{R - Q}{P} \approx localeToFixed((R - Q) / P, 2)

Since we only care about whole months that person(1) has spent working, we round localeToFixed((R - Q) / P, 2) up to X.

x \geq \dfrac{R - Q}{P} = (R - Q) / P

person(1) must work for at least X months.