def pv_payments(n):
if n == <NUM_LIT:1>:<EOL><INDENT>return <NUM_LIT:1> / (<NUM_LIT:1> + interest_rate)<EOL><DEDENT>else:<EOL><INDENT>return pv_payments(n - <NUM_LIT:1>) + <NUM_LIT:1> / (<NUM_LIT:1> + interest_rate) ** n<EOL><DEDENT>
Present value of repayments of 1 for n years.