What we are solvingTax T depends on the amount earned A in three bands
Arrange the given flow-chart parts, state its purpose and dry run it for A = 1500, 3500, 9000
Chapter: Numerical methods
Topic: flow charts (algorithms, loops and dry runs)
Concept and formulasA flow chart starts, sets a counter, reads data, makes decisions, computes, prints, and loops until the counter condition is met
Here the counter N counts the amounts read; the loop stops when N = 200
Tax bands
A<2000: T=0;2000≤A≤5000: T=1002A;A>5000: T=60+1005(A−5000)(a) (9 marks)(i) The order: START → N = 1 → READ: A → Is A < 2000? (yes: T = 0) → no: Is A ≤ 5000? (yes: T = 2A/100) → no: T = 60 + 5(A − 5000)/100 → PRINT: T, A → Is N = 200? yes: STOP; no: N = N + 1 and back to READ: A
(ii) Purpose: to compute and print the tax T paid on each of 200 amounts earned A
(b) (3 marks)A = 1500: 1500 < 2000, so T = 0
A = 3500: 2000 ≤ 3500 ≤ 5000, so
T=1002×3500=70A = 9000: 9000 > 5000, so
T=60+1005(9000−5000)=60+200=260Answer: (a) flow chart as shown; it computes and prints the tax on 200 amounts (b) T = 0, 70, 260 dollars
Tip: The 60 in the top band is the tax on the first 5000 dollars (2% of 5000), so the bands join smoothly