Skip to content

lisbeth34/-finance_calculators.py.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Finance Calculator

  • 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.

Features

  • 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.)

Requirements

  • Python 3.x

Usage

Run the script using Python:

-python finance_calculator.py

  • Follow the prompts to enter the necessary details for your calculation.

Functionality

  • 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.)

Example

  • 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

Enter your choice: investment

  • 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

Code Overview

  • 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.

Future Enhancements

  • Implement the bond calculation functionality.
  • Add error handling for invalid inputs.
  • Allow for more complex investment and loan scenarios.

Screenshot

Screenshot (2) simple respe compound bond

About

financial calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages