Question: how to calculate compound interest in python?
Answer: Compound interest. Write a Python program that assigns the principal amount of $100 to variable p , assigns to n the value 12, and assigns to r the interest rate of 8% (as a float). Then have the program prompt the user for the number of years, t , for which the money will be compounded.