PYTHON

Write a python program to enter P, T, R and calculate Simple Interest and Compound Interest.

# Program to calculate Simple Interest and Compound Interest P = float(input("Enter Principal Amount (P): ")) T = float(input("Enter Time in Years (T): ")) R = float(input("Enter Rate of Interest (R): ")) # Simple Interest Formula: SI = (P * T * R) / 100 SI = (P * T * R) / 100 # Compound Interest Formula: CI = P * (1 + R/100)^T - P CI = P * (1 + R/100)**T - P # Output print("\n------ Results ------") print("Simple Interest (SI):", SI) print("Compound Interest (CI):", CI)

OUTPUT

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.