Simple Interest Calculator

Calculate simple interest and total amount.

BeginnerPhase 6 - Category 5: Real-World Logic ProblemsExample 4 of 15
simple-interest-calculator.py
1# Take inputs
2principal = float(input("Enter principal: "))
3rate = float(input("Enter rate (%): "))
4time = float(input("Enter time (years): "))
5
6# Calculate
7interest = (principal * rate * time) / 100
8amount = principal + interest
9
10print(f"Simple Interest: {interest:.2f}")
11print(f"Total Amount: {amount:.2f}")

Output

Enter principal: 10000
Enter rate (%): 5
Enter time (years): 2
Simple Interest: 1000.00
Total Amount: 11000.00

What's going on

Calculate simple interest using formula.

Key Concepts:

SI = (P * R * T) / 100
Amount = Principal + Interest
Simple calculation