Print the present-value-of-$1 table for years 1–5 at 4, 6, 8, 10 and 12 %, each factor rounded to four decimals as a printed table would show it.
Print the present-value-of-$1 table for years 1–5 at 4, 6, 8, 10 and 12 %, each factor rounded to four decimals as a printed table would show it.
Answer
rates = (0.04, 0.06, 0.08, 0.10, 0.12) print('n ' + ' '.join(f'{int(r * 100)}%'.rjust(6) for r in rates)) for n in range(1, 6): factors = [1 / (1 + r) ** n for r in rates] print(f'{n} ' + ' '.join(f'{f:.4f}' for f in factors))
Bigel §10.2, §10.5, §10.9, §10.14; Hermanson Vol 2 ch 26; Heisinger & Hoyle §8.8