Basic Compound Interest Calculation Dry Run in PYTHON

Basic Compound Interest Calculation is an interactive PYTHON dry run visualizer from the Io programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.

This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.

Basic Compound Interest Calculation Program Code

# Method 1: Basic Compound Interest Calculation
# Formula: A = P(1 + R/100)^T
# CI = A - P

P = float(input("Enter Principal amount: "))
R = float(input("Enter Rate of interest: "))
T = float(input("Enter Time (in years): "))

# Calculate Amount using formula
Amount = P * (1 + R/100) ** T

# Calculate Compound Interest
CI = Amount - P

print(f"\n========== COMPOUND INTEREST ==========")
print(f"Principal (P):     ₹{P:10.2f}")
print(f"Rate (R):          {R:10.2f}%")
print(f"Time (T):          {T:10.2f} years")
print(f"Amount (A):        ₹{Amount:10.2f}")
print(f"Compound Interest: ₹{CI:10.2f}")
print(f"========================================")

View the complete Io programs page.

Program Console Basic Compound Interest Calculation Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.