LearnPy Hub
← Variables problems
Hard

Monthly Loan Payment

Read a loan amount P, a yearly interest rate R (percent) and a number of months n. With monthly rate r = R / 1200, the payment is P·r / (1 − (1 + r)−n). Print it with 2 decimals. (R is never 0.)

Input

Three numbers, one per line.

Output

One number.

Sample 1

Input
100000
12
12
Output
8884.88

Sample 2

Input
5000
6
24
Output
221.60
solution.py
Output appears here
Monthly Loan Payment · Python practice problem · LearnPy Hub