Here is a little something I got going. I could finish the code for you, but I figure it isn't learning if it's all the way done ;)
Here is a little something I got going. I could finish the code for you, but I figure it isn't learning if it's all the way done ;)
compounded_interest * years = sum
That will help you get to where you need to go. There are other ways you can futher this program by adding in features that could import your spreadsheets and take in the data for you. However, that is a little bit beyond me and I am still learning as well.
def compound_investment(): try: i = input("[Investment Amount]: $") if not i.isnumeric(): raise TypeError else: print(int(i)) except TypeError: print("[TypeError]: Please enter numerical values only!\n\n") compound_investment() compound_investment() print("Investment Float: {}{:.2f}".format( "$", int(2) ))
Here is a little something I got going. I could finish the code for you, but I figure it isn't learning if it's all the way done ;)
def compound_investment(): try: i = input("[Investment Amount]: $") if not i.isnumeric(): raise TypeError else: print(float(i)) except TypeError: print("[TypeError]: Please enter numerical values only!\n\n") compound_investment() compound_investment() print("Investment Float: {}{:.2f}".format( "$", float(2) ))You may want to consider adding some of your own variables to determine how many years they are employed. You also want to include a formula in the function that calculates your compounded interest. One way would be compounded_interest = float(investment*0.2)+investment
compounded_interest * years = sum
That will help you get to where you need to go. There are other ways you can futher this program by adding in features that could import your spreadsheets and take in the data for you. However, that is a little bit beyond me and I am still learning as well.