A calculator that calculates simple interest given principal, annual rate of interest, and time period in years.
p
: Principal amountt
: Time period in yearsr
: Annual rate of interest
Simple interest = p * t * r
If you have:
- Principal (p) = $1000
- Time (t) = 2 years
- Rate (r) = 5% (or 0.05)
The simple interest is calculated as:
Simple interest = 1000 * 2 * 0.05 = $100
- Clone the repository:
git clone <your_repository_url>
- Navigate to the directory:
cd <your_repository_directory>
- Run the script:
python calculate_interest.py <principal> <time> <rate>