Answer:
See Explaination
Step-by-step explanation:
def compound_interest(principal, roi, term, payout_frequency):
return principal * ((1 + (roi / payout_frequency)) ** (payout_frequency * term))
if __name__ == "__main__":
# get input from user
principal_amount = int(input("Enter principal amount: "))
rate_of_interest = float(input("Enter rate of interest: "))
term_in_years = int(input("Enter number of years: "))
interest_payout_frequency = int(input("Enter frequency of interest payout: "))
# call compound interest calculating function
final_amount = compound_interest(principal_amount,
rate_of_interest,
term_in_years,
interest_payout_frequency)
print("Final Amount: ", final_amount)