Skip to content

XanderSteyn/HyperionDev.Finance-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Variables and Control Structures - CLI Investment & Bond Calculator

Features

  • Investment Calculator: Calculate returns on investments with both simple and compound interest
  • Bond Calculator: Calculate monthly home loan repayments
  • Input Validation: Robust error handling with positive number validation
  • User-Friendly Interface: Clear prompts and formatted output
  • Recursive Operation: Option to perform multiple calculations in one session
  • Comprehensive Error Handling: Graceful handling of invalid inputs

How It Works

  • Investment Calculator:

    • Simple Interest:
      A = P × (1 + r × t)

    • Compound Interest:
      A = P × (1 + r) ^ t

    Where:
    P = principal amount
    r = annual interest rate (decimal)
    t = number of years invested

  • Bond Calculator:

    • Monthly Repayment:
      repayment = (i × P) / (1 - (1 + i) ^ (-n))

    Where:
    P = present value (house price)
    i = monthly interest rate (decimal)
    n = number of months to repay

Technologies Used

  • Python – Core programming language
  • Math Module – For mathematical calculations (pow function)

Setup Instructions

1. Clone the repository

git clone https://github.com/XanderSteyn/HyperionDev.Variables-Control-Structures/

2. Change to the project directory

cd "HyperionDev.Variables-Control-Structures"

3. Run the application

python finance_calculators.py

License

This repository is protected by a custom license. See the LICENSE file for details.

Unauthorized copying or submission of this work for academic purposes is prohibited.

About

CLI finance calculator for investments and bonds ~ built in Python

Topics

Resources

License

Stars

Watchers

Forks