# Python program to enter the P, T, R, and calculate its Compound Interest

ADVERTISEMENTS

Python program to enter the P, T, R, and calculate its Compound Interest. There are you will learn how to find the Compound Interest through P, T, R in the Python language.

**Formula:**

*CI = P * pow((1 + R / 100), T)*

**Where:**

*P = Principal Amount*

*T = Time*

*R = Rate*

*CI = Compound Interest*

Let us understand this example through the Python program:

```
# Python program to enter P, T, R, and calculate Compound Interest
import math
print("Enter the principal (amount), time, and rate::")
p, t, r, CI = float(input()), float(input()), float(input()), None
# p = principle
# t = time
# r = rate
# CI = compound interest
# Calculate compound interest
CI = p * (math.pow((1 + r / 100), t))
# Output
print("Compound Interest = ", CI)
```

**Output:**

Enter the principal (amount), time, and rate::

5

7

9

Compound Interest = 9.140195604083454