def compound_interest(initial_amount, rate, periods_elapsed):
return initial_amount * (1 + (rate/100))**periods_elapsed
# Example: 100 of money, 5 %, 12 months passed
print(compound_interest(100, 5, 12)) # -> 179.5856
# The formula:
# A = P(1 + r/100)^t