- The Finance Calculator is a simple Python program designed to help you calculate the future value of your investments or the monthly payment on a home loan (bond). You can choose between investment calculations and bond calculations. Note that the bond calculation feature is not yet implemented in the provided code.
- Investment Calculation: Calculate the total amount of an investment based on either simple or compound interest.
- Bond Calculation: Calculate the monthly payment required to repay a home loan over a specified period. (Note: This feature is not yet implemented in the provided code.)
- Python 3.x
- Clone or download the repository to your local machine.
- https://github.com/lisbeth34/-finance_calculators.py..git
- Navigate to the directory where the script is located.
-python finance_calculator.py
- Follow the prompts to enter the necessary details for your calculation.
-
1. Investment Calculation
-
Choose 'investment' when prompted.
-
Enter the amount of money you are depositing.
-
Enter the interest rate as a percentage.
-
Enter the number of years you plan on investing.
-
Choose between 'simple' or 'compound' interest.
-
The program will display the total amount after the specified number of years.
-
2. Bond Calculation -Choose 'bond' when prompted. (Note: This feature is mentioned but not implemented in the provided code.)
-
Choose either 'investment' or 'bond' from the menu below to proceed:
-
investment - to calculate the amount of interest you'll earn on interest
-
bond - to calculate the amount you'll have to pay on a home loan
-
Provide the following investment details:
-
Enter the amount of money that you are depositing: 10000
-
Enter the interest rate (as a percentage): 5
-
Enter the number of years you plan on investing for: 10
-
Do you want 'simple' or 'compound' interest: compound
-
After 10 years at an interest rate of 5.0%, you will have: 16288.95
- get_user_choice(): Displays the menu options and returns the user's choice.
- get_investment_details(): Prompts the user for investment details and returns them.
- calculate_investment(amount, interest_rate, years, interest): Calculates and displays the total amount after investment based on the interest type.
- main(): Main function to execute the finance calculator. Calls other functions based on the user's choice.
- Implement the bond calculation functionality.
- Add error handling for invalid inputs.
- Allow for more complex investment and loan scenarios.