This Python script calculates Simple Interest (SI) and Compound Interest (CI) based on user input.
- SI = (P × R × T) / 100
- CI = P × (1 + R/100)^T − P
Run the script in any Python environment and input:
- Principal (P)
- Annual Rate (%)
- Time in Years (T)
You’ll get both the Simple and Compound Interest values.