forked from Khan/khan-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
/
discount_tax_and_tip_word_problems.html
175 lines (169 loc) · 13.5 KB
/
discount_tax_and_tip_word_problems.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!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">randRange(4,25).toFixed(2)</var>
<var id="SALES_TAX">randRange(3,19)</var>
<var id="TOTAL_PRICE">roundTo(2, (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>
<p class="solution" data-forms="dollar"><var>TOTAL_PRICE</var></p>
<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 one 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).toFixed(2)</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>=</code> <code class="hint_purple">$<var>((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>((SALES_TAX/100) * DOLLARS).toFixed(2)</var></code> + <code class="hint_green">$<var>DOLLARS</var></code> <code>=</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">roundTo(1, randRange(31,139) / 10 )</var>
<var id="PRICE">randRange(3,200).toFixed(2)</var>
<var id="TOTAL_TAX">roundTo(2, (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>? Round to the nearest cent.</p>
</div>
<p class="solution" data-forms="dollar"><var>TOTAL_TAX</var></p>
<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 item.</p>
<p><code class="hint_blue"><var>TAX</var>\%</code> <code>\times</code> <code class="hint_green">$<var>PRICE</var></code><code> =</code></p>
</div>
<div>
<p>Percent means "out of one 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).toFixed(3)</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. Round to the nearest cent.</p>
<p><code class="hint_blue"><var>(TAX/100).toFixed(3)</var></code> <code>\times</code> <code class="hint_green">$<var>PRICE</var></code> = <code class="hint_orange">$<var>TOTAL_TAX</var></code>
<p class="final_answer">You would pay <code class="hint_orange">$<var>TOTAL_TAX</var></code> in sales tax.</p>
</div>
</div>
</div>
<div id="total-price-with-discount">
<div class="vars">
<var id="PRICE">(randRange(8,85)).toFixed(2)</var>
<var id="DISCOUNT">randRange(1,11)*5</var>
<var id="DISCOUNT_PRICE">roundTo(2, 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>
<p class="solution" data-forms="dollar"><var>DISCOUNT_PRICE</var></p>
<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> <code>\times</code> <code class="hint_green"><var>DISCOUNT</var>\%</code> <code>=</code></p>
</div>
<div>
<p>Percent means "out of one 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).toFixed(2)</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).toFixed(2)</var></code> <code>\times</code> <code class="hint_blue">$<var>PRICE</var></code><code> = </code><code class="hint_purple">$<var>((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>-</code> <code class="hint_purple">$<var>(DISCOUNT/100*PRICE).toFixed(2)</var></code><code> = </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">randRange(6,20)</var>
<var id="TOTAL_DISCOUNT">roundTo(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>% off 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>
<p class="solution" data-forms="dollar"><var>TOTAL_DISCOUNT</var></p>
<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> <code>\times</code> <code class="hint_green">$<var>PRICE</var></code> =</p>
</div>
<div>
<p>Percent means "out of one 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).toFixed(2)</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).toFixed(2)</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">roundTo(2, 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>