Sub topic 2
Reversing a change and price-consumption problems
This chapter assumes you know fractions, decimals and percentages, can do mental multiplication and division, and can solve a linear equation in one variable.
Reversing a change
A percentage change multiplies a quantity by a factor. A 25% rise multiplies by 1.25. To undo it, multiply by the reciprocal, 1/1.25 = 0.8. That is a fall of 20%, not 25%. The base changes when the direction reverses.
from fractions import Fraction
rise = Fraction(25, 100)
undo = 1 / (1 + rise)
print((1 - undo) * 100) # 20Price and consumption
If the price rises 25% and spending stays the same, the quantity bought must fall. Spending equals price times quantity, so the quantity factor is 1/1.25. Consumption falls 20%.
Cost price, selling price and profit
Cost price (CP) is what the seller pays. Selling price (SP) is what the buyer pays. Profit is SP − CP when SP is higher, and loss is CP − SP otherwise. Profit percentage is always measured on CP:
Profit % = (SP − CP) / CP × 100
Marked price and discount
Marked price (MP) is the list price. A discount of d% gives SP = MP × (1 − d/100). A markup and a discount combine as multipliers, not as sums.
Example: CP = 500. Marking it 40% above cost gives MP = 700. A 10% discount then gives SP = 630, a profit of 26% on CP.
from fractions import Fraction
cp = Fraction(500)
mp = cp * Fraction(140, 100)
sp = mp * Fraction(90, 100)
profit_pct = (sp - cp) / cp * 100
print(sp, profit_pct) # 630 26Exercise
A price rises 25%. By what percent must consumption fall so that spending stays the same?
Show answer
20%, because 1/1.25 = 0.8, a fall of 20%.