Home API Notes

Printing "Hello"

print("Hello")
Hello

Time value of money after one year calculator!

With this calculator that I made, you can insert any initial amount of money and any interest rate. In this demo, I started with $1000 and used an interest rate of 0.1563.

print("Lets calculate your time value of money after one year!")
print("How much money are you investing?")

# Input the initial amount of money 
Money = float(input("Amount of money: "))

print("$" + "{:.2f}".format(Money))

# Input interest rate
print("What is the interest rate of your investment?")

r = float(input("Interest rate: "))
percent = (r * 100)

# Interest rate shown as a percentage
print("{:.2f}".format(percent) + "%")

# Calculation of the final amount of money 
final_amount = (Money * (1 + r))

print('This will be your amount of money after one year.')
print("$" + "{:.2f}".format(final_amount))
Lets calculate your time value of money after one year!
How much money are you investing?
$50.00
What is the interest rate of your investment?
15.00%
This will be your amount of money after one year.
$57.50