Answer:
Python code is given below
Step-by-step explanation:
#This program will calculate compound interest earn by the account after a specified number of years
def main():
#Asking the user for input
principal = float(input("Enter the amount of principal amount to be deposited: "))
rate = float(input("Enter annual interest rate paid by the account: "))
num = int(input("Enter the number of times per year that the interest is compunded: "))
years = float(input("Enter the number of years the account will be left to earn interest: "))
#Calculating the balance of the account after a specified number of years
amount = principal*(1+(rate*.01)/num)**(num*years)
#Printing result
print("The amount of money will be in the account after ", years, "years:", round(amount,2))
main() #calling main() function