Permalink
Browse files

add exercise discount-tax-tip word problems, took out the tip problem…

… type from percentage word problems 1
  • Loading branch information...
1 parent 9386e20 commit e8e3bdd28e1ead980b3159e0aeec3cbce0c3dabb @msuhendra committed Feb 16, 2012
Showing with 171 additions and 42 deletions.
  1. +171 −0 exercises/discount_tax_and_tip_word_problems.html
  2. +0 −42 exercises/percentage_word_problems_1.html
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html data-require="math word-problems spin graphie graphie-helpers-arithmetic">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Discount, tax, and tip word problems</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="problems">
+
+ <div id="tax-total-cost">
+ <div class="vars">
+ <var id="DOLLARS">parseFloat(randRange(4,25)).toFixed(2)</var>
+ <var id="SALES_TAX">randRange(3,19)</var>
+ <var id="TOTAL_PRICEA">parseFloat((SALES_TAX/100)*DOLLARS + DOLLARS).toFixed(2)</var>
+ <var id="TOTAL_PRICE">parseFloat((1+(SALES_TAX/100))*DOLLARS).toFixed(2)</var>
+ </div>
+ <div class="question spin">
+ <p><var>person(1)</var> buys a basket of <var>plural(fruit(1))</var> on sale for $<var>DOLLARS</var>. The sales tax is <var>SALES_TAX</var>%. What is the total price <var>person(1)</var> pays for the basket of <var>plural(fruit(1))</var>? (Round to the nearest hundredth or cent.)</p>
+ </div>
+ <div class="hints">
+ <div>
+ <p>In order to find the total price, first find the amount of sales tax paid by multiplying the sales tax by the original price of the basket of <var>plural(fruit(1))</var>.</p>
+ <p><code class="hint_blue"><var>SALES_TAX</var>\%</code> <code>\times</code> <code class="hint_green">$<var>DOLLARS</var></code> =</p>
+ </div>
+ <div>
+ <p>Percent means "out of a hundred," so <code class="hint_blue"><var>SALES_TAX</var>\%</code> is equivalent to <code class="hint_blue">\displaystyle\frac{<var>SALES_TAX</var>}{100}</code> which is also equal to <code class="hint_blue"><var>SALES_TAX</var> \div 100</code>.</p>
+ <p><code class="hint_blue"><var>SALES_TAX</var> \div 100 = <var>SALES_TAX/100</var></code>
+ </div>
+ <div>
+ <p>Multiply the sales tax you just converted into a decimal by the original price to find the amount of sales tax that must be paid.</p>
+ <p><code class="hint_blue"><var>SALES_TAX/100</var></code> <code>\times</code> <code class="hint_green">$<var>DOLLARS</var></code> = <code class="hint_purple">$<var>parseFloat((SALES_TAX/100) * DOLLARS).toFixed(2)</var></code>
+ </div>
+ <div>
+ <p>Add the sales tax you just found to the original price to find the final price <var>person(1)</var> paid.<p>
+ <p><code class="hint_purple">$<var>parseFloat((SALES_TAX/100) * DOLLARS).toFixed(2)</var></code> + <code class="hint_green">$<var>DOLLARS</var></code> = <code class="hint_orange">$<var>TOTAL_PRICE</var></code>
+ <p class="final_answer"><var>person(1)</var> needs to pay <code class="hint_orange">$<var>TOTAL_PRICE</var>.</code></p>
+ </div>
+ </div>
+ </div>
+
+ <div id="simple-tax">
+ <div class="vars">
+ <var id="TAX">randRange(3.1,13.9)</var>
+ <var id="PRICE">parseFloat(3,200).toFixed(2)</var>
+ <var id="TOTAL_TAX">parseFloat((TAX/100)*PRICE).toFixed(2)</var>
+ </div>
+ <div class="question spin">
+ <p>If the sales tax in your city is <var>TAX</var>%, how much tax would you pay for an item that costs $<var>PRICE</var>?</p>
+ </div>
+ <div class="hints">
+ <div>
+ <p>In order to find the amount of sales tax you would pay, multiply the sales tax by the original price of the of the item.</p>
+ <p><code class="hint_blue"><var>TAX</var>\%</code> x <code class="hint_green">$<var>PRICE</var></code> =</p>
+ </div>
+ <div>
+ <p>Percent means "out of a hundred," so <code class="hint_blue"><var>TAX</var>\%</code> is equivalent to <code class="hint_blue"><var>TAX</var> \div 100</code>.</p>
+ <p><code class="hint_blue"><var>TAX</var> \div 100 = <var>TAX/100</var></code>
+ </div>
+ <div>
+ <p>Multiply the sales tax you just converted into a decimal by the original price to find the amount of sales tax that must be paid.</p>
+ <p><code class="hint_blue"><var>TAX/100</var></code> <code>\times</code> <code class="hint_green">$<var>PRICE</var></code> = <code class="hint_orange">$<var>parseFloat((TAX/100) * PRICE).toFixed(2)</var></code>
+ <p class="final_answer">You would pay <code class="hint_orange">$<var>floorTo(2, TOTAL_TAX)</var></code> in sales tax.</p>
+ </div>
+ </div>
+ </div>
+
+ <div id="total-price-with-discount">
+ <div class="vars">
+ <var id="PRICE">parseFloat(8,85).toFixed(2)</var>
+ <var id="DISCOUNT">randRange(1,11)*5</var>
+ <var id="DISCOUNT_PRICE">parseFloat(PRICE-(DISCOUNT/100*PRICE)).toFixed(2)</var>
+ </div>
+ <div class="question spin">
+ <p><var>person(1)</var> bought a new <var>clothing( 1 )</var> at the store when they were having a <var>DISCOUNT</var>% off sale. If the regular price of the <var>clothing( 1 )</var> was $<var>PRICE</var>, how much did <var>person(1)</var> pay with the discount?</p>
+ </div>
+ <div class="hints">
+ <div>
+ <p>First, find the amount of the discount by multiplying the original price of the of the item by the discount.</p>
+ <p><code class="hint_blue">$<var>PRICE</var></code> x <code class="hint_green"><var>DISCOUNT</var>\%</code> =</p>
+ </div>
+ <div>
+ <p>Percent means "out of a hundred," so <code class="hint_green"><var>DISCOUNT</var>\%</code> is equivalent to <code class="hint_green">\displaystyle\frac{<var>DISCOUNT</var>}{100}</code> which is also equal to <code class="hint_green"><var>DISCOUNT</var> \div 100</code>.</p>
+ <p><code class="hint_green"><var>DISCOUNT</var> \div 100 = <var>DISCOUNT/100</var></code>
+ </div>
+ <div>
+ <p>Multiply the discount you just converted into a decimal by the original price to find the amount of money saved.</p>
+ <p><code class="hint_green"><var>DISCOUNT/100</var></code> <code>\times</code> <code class="hint_blue">$<var>PRICE</var></code> = <code class="hint_purple">$<var>parseFloat((DISCOUNT/100) * PRICE).toFixed(2)</var></code>
+ </div>
+ <div>
+ <p>Subtract the discount you just found from the original price to get the final price <var>person(1)</var> paid.<p>
+ <p><code class="hint_blue">$<var>PRICE</var></code> - <code class="hint_purple">$<var>parseFloat(DISCOUNT/100*PRICE).toFixed(2)</var></code> = <code class="hint_orange">$<var>DISCOUNT_PRICE</var></code>,</p>
+ <p class="final_answer"><var>person(1)</var> paid <code class="hint_orange">$<var>DISCOUNT_PRICE</var></code> for the <var>clothing(1)</var>.</p>
+ </div>
+ </div>
+ </div>
+
+ <div id="simple-discount">
+ <div class="vars">
+ <var id="DISCOUNT">randRange(1,11)*5</var>
+ <var id="PRICE">parseFloat(6,20).toFixed(2)</var>
+ <var id="TOTAL_DISCOUNT">parseFloat(2,DISCOUNT/100*PRICE).toFixed(2)</var>
+ </div>
+ <div class="question spin">
+ <p>The <var>pizza(1)</var> store is having a <var>DISCOUNT</var>% sale on all of its <var>plural(pizza(1))</var>. If the <var>pizza(1)</var> you want regularly costs $<var>PRICE</var>, how much would you save with the discount?</p>
+ </div>
+ <div class="hints">
+ <div>
+ <p>In order to find the amount saved with the discount, multiply the discount by the original price.</p>
+ <p><code class="hint_blue"><var>DISCOUNT</var>\%</code> x <code class="hint_green">$<var>PRICE</var></code> =</p>
+ </div>
+ <div>
+ <p>Percent means "out of a hundred," so <code class="hint_blue"><var>DISCOUNT</var>\%</code> is equivalent to <code class="hint_blue">\displaystyle\frac{<var>DISCOUNT</var>}{100}</code> which is also equal to <code class="hint_blue"><var>DISCOUNT</var> \div 100</code>.</p>
+ <p><code class="hint_blue"><var>DISCOUNT</var> \div 100 = <var>DISCOUNT/100</var></code>
+ </div>
+ <div>
+ <p>Multiply the discount you just converted into a decimal by the original price to find the amount of money saved.</p>
+ <p><code class="hint_blue"><var>DISCOUNT/100</var></code> <code>\times</code> <code class="hint_green">$<var>PRICE</var></code> = <code class="hint_orange">$<var>TOTAL_DISCOUNT</var></code></p>
+ <p class="final_answer">You would save <code class="hint_orange">$<var>TOTAL_DISCOUNT</var></code> because of the discount.</p>
+ </div>
+ </div>
+ </div>
+ <div id="tip">
+ <div class="vars">
+ <var id="BILL">randRange( 20, 50 )</var>
+ <var id="BILL_FORMAT">parseFloat( BILL ).toFixed( 2 )</var>
+ <var id="TIP_PERCENT">randRange( 1, 4 ) * 5</var>
+ <var id="TIP_AMOUNT">BILL * ( TIP_PERCENT / 100 )</var>
+ <var id="TIP_AMOUNT_FORMAT">parseFloat( TIP_AMOUNT ).toFixed( 2 )</var>
+ <var id="TIP_TEN_PERCENT">parseFloat( BILL * 0.1 ).toFixed( 2 )</var>
+ <var id="TIP_FIVE_PERCENT">parseFloat( BILL * 0.05 ).toFixed( 2 )</var>
+ <var id="TOTAL">BILL + TIP_AMOUNT</var>
+ <var id="TOTAL_FORMAT">parseFloat( TOTAL ).toFixed( 2 )</var>
+ </div>
+ <div class="question">
+ <p class="spin"><var>person(1)</var> {has {breakfast|lunch|dinner}|eats} at a {restaurant|cafe} and the cost of <var>his(1)</var> meal is $<var>BILL_FORMAT</var>. <var>He(1)</var> would like to leave a <var>TIP_PERCENT</var>% tip. What is <var>his(1)</var> total bill including tip?</p>
+ </div>
+ <p class="solution" data-forms="dollar"><var>TOTAL</var></p>
+ <div class="hints">
+ <div>
+ <p>The tip amount is equal to <code><var>TIP_PERCENT</var>\% \times \$<var>BILL_FORMAT</var></code>.</p>
+ <p data-if="TIP_PERCENT !== 10">We can find the tip by first calculating a <code class="hint_purple">10\%</code> tip <span data-if="TIP_PERCENT === 5"> and then dividing that number by two.</span><span data-else-if="TIP_PERCENT === 20"> and then multiplying that number by two.</span><span data-else> and a <code class="hint_pink">5\%</code> tip, and then adding those two numbers together.</span></p>
+ </div>
+ <div>
+ <p>To calculate a <code class="hint_purple">10\%</code> tip, move the decimal point in <code>\$<var>BILL_FORMAT</var></code> one place to the left.</p>
+ <p><code class="hint_purple">10\%</code> <code>\times \$<var>BILL_FORMAT</var></code> = <code class="hint_purple">\$<var>TIP_TEN_PERCENT</var></code></p>
+ </div>
+ <div data-if="TIP_PERCENT !== 10">
+ <div data-if="TIP_PERCENT % 10 === 5">
+ <p>To calculate a <code class="hint_pink">5\%</code> tip, divide the <code class="hint_purple">10\%</code> tip amount in half.</p>
+ <p><code class="hint_pink">5\%</code> <code>\times \$<var>BILL_FORMAT</var> = </code><code class="hint_purple">\$<var>TIP_TEN_PERCENT</var></code><code> \div 2 = </code><code class="hint_pink">\$<var>TIP_FIVE_PERCENT</var></code>.</p>
+ </div>
+ <div data-else>
+ <p>To calculate a <code class="hint_green">20\%</code> tip, multiply the <code class="hint_purple">10\%</code> tip amount by two.</p>
+ <p><code class="hint_green">20\%</code> <code>\times \$<var>BILL_FORMAT</var></code> = <code class="hint_purple">\$<var>TIP_TEN_PERCENT</var></code><code> \times 2 = </code><code class="hint_green">\$<var>TIP_AMOUNT_FORMAT</var></code>.</p>
+ </div>
+ </div>
+ <div data-if="TIP_PERCENT === 15">
+ <p>Adding the two amounts together gives us <code class="hint_purple">\$<var>TIP_TEN_PERCENT</var></code> + <code class="hint_pink">\$<var>TIP_FIVE_PERCENT</var> =</code><code> \$<var>TIP_AMOUNT_FORMAT</var></code>.</p>
+ </div>
+ <p>The cost of the meal plus the amount of the tip will equal the total bill amount.</p>
+ <p><code>\$<var>BILL_FORMAT</var> + \$<var>TIP_AMOUNT_FORMAT</var> = </code><code class="hint_orange">\$<var>TOTAL_FORMAT</var></code>.</p>
+ <p class="final_answer">The total cost of the bill is <code class="hint_orange">\$<var>TOTAL_FORMAT</var></code>.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+
+</body>
+</html>
@@ -74,48 +74,6 @@
<p><code>x \approx <var>YEAR_LAST</var></code></p>
</div>
</div>
- <div id="tip">
- <div class="vars">
- <var id="BILL">randRange( 20, 50 )</var>
- <var id="BILL_FORMAT">parseFloat( BILL ).toFixed( 2 )</var>
- <var id="TIP_PERCENT">randRange( 1, 4 ) * 5</var>
- <var id="TIP_AMOUNT">BILL * ( TIP_PERCENT / 100 )</var>
- <var id="TIP_AMOUNT_FORMAT">parseFloat( TIP_AMOUNT ).toFixed( 2 )</var>
- <var id="TIP_TEN_PERCENT">parseFloat( BILL * 0.1 ).toFixed( 2 )</var>
- <var id="TIP_FIVE_PERCENT">parseFloat( BILL * 0.05 ).toFixed( 2 )</var>
- <var id="TOTAL">BILL + TIP_AMOUNT</var>
- <var id="TOTAL_FORMAT">parseFloat( TOTAL ).toFixed( 2 )</var>
- </div>
- <div class="question">
- <p class="spin"><b><var>person(1)</var> {has {breakfast|lunch|dinner}|eats} at a {restaurant|cafe} and the cost of <var>his(1)</var> meal is $<var>BILL_FORMAT</var>. <var>He(1)</var> would like to leave a <var>TIP_PERCENT</var>% tip. What is <var>his(1)</var> total bill including tip?</b></p>
- </div>
- <p class="solution" data-forms="dollar"><var>TOTAL</var></p>
- <div class="hints">
- <div>
- <p>The tip amount is equal to <code><var>TIP_PERCENT</var>\% \times \$<var>BILL_FORMAT</var></code>.</p>
- <p data-if="TIP_PERCENT !== 10">We can find the tip by first calculating a <code>10\%</code> tip <span data-if="TIP_PERCENT === 5"> and then dividing that number by two.</span><span data-else-if="TIP_PERCENT === 20"> and then multiplying that number by two.</span><span data-else> and a <code>5\%</code> tip, and then adding those two numbers together.</span></p>
- </div>
- <div>
- <p>To calculate a <code>10\%</code> tip, move the decimal point in <code>\$<var>BILL_FORMAT</var></code> one place to the left.</p>
- <p><code>10\% \times \$<var>BILL_FORMAT</var> = \$<var>TIP_TEN_PERCENT</var></code></p>
- </div>
- <div data-if="TIP_PERCENT !== 10">
- <div data-if="TIP_PERCENT % 10 === 5">
- <p>To calculate a <code>5\%</code> tip, divide the <code>10\%</code> tip amount in half.</p>
- <p><code>5\% \times \$<var>BILL_FORMAT</var> = \$<var>TIP_TEN_PERCENT</var> \div 2 = \$<var>TIP_FIVE_PERCENT</var></code>.</p>
- </div>
- <div data-else>
- <p>To calculate a <code>20\%</code> tip, multiply the <code>10\%</code> tip amount by two.</p>
- <p><code>20\% \times \$<var>BILL_FORMAT</var> = \$<var>TIP_TEN_PERCENT</var> \times 2 = \$<var>TIP_AMOUNT_FORMAT</var></code>.</p>
- </div>
- </div>
- <div data-if="TIP_PERCENT === 15">
- <p>Adding the two amounts together gives us <code>\$<var>TIP_TEN_PERCENT</var> + \$<var>TIP_FIVE_PERCENT</var> = \$<var>TIP_AMOUNT_FORMAT</var></code>.</p>
- </div>
- <p>The cost of the meal plus the amount of the tip will equal the total bill amount.</p>
- <p><code>\$<var>BILL_FORMAT</var> + \$<var>TIP_AMOUNT_FORMAT</var> = \$<var>TOTAL_FORMAT</var></code>.</p>
- <p>The total cost of the bill is <code>\$<var>TOTAL_FORMAT</var></code>.</p>
- </div>
</div>
</div>
</div>

0 comments on commit e8e3bdd

Please sign in to comment.