Can you solve this problem in programming language BASH?
You will implement a simple mortgage calculator. The goal is to compute the average monthly payment so a user can assess if they can afford the minimum monthly payments. Consider that you would like to apply for a 30-year fixed loan amount of $300,000 at an annualized interest rate of 5.75%. Your mortgage calculator should be able to compute the monthly payment up to two decimal places. Here is a formula A that you should use: MonthlyPayment=Principal[InterestRate((1+InterestRate)NumMonths)]/[((1+InterestRate)NumMonths)1] where - Principal is the principal amount. - InterestRate is the normalized percent interest per month. So if the APR or annualized percentage rate is 5.75%, the normalized percent interest per month would be 5.75/(10012)=.004791. - NumMonths is the number of months over the period of loan. So if the period of loan is 30 years, we get 3012=360 monthly payments. 3012=360 monthly payments. Function Description Complete the function mort calc in the editor below. Given the loan amount, annual interest and period of loan in years, you need to calculate the monthly payment. The loan amount is the Principal. The annual interest can be converted into normalized percent interest per month (InterestRate) as mentioned above. And the NumMonthlyPayments are obtained by multiplying the loan period by 12 . Note that you can use bc (basic calculator) to perform calculations with a given scale. For instance: int ="$( echo "scale=6; 2.75/(10012)"bcq)" the above will pipe an arithmetic expression that allows us to divide annual interest 2.75 by (10012) in order to get the normalized monthly percentage. And then you can use this interest rate using the MonthlyPayment formula A mentioned above, along with the principal amount, and computed NumMonths to generate another arithmetic expression that you can process again using bc. Again, you can use bc to compute NumMonths. Finally in order to truncate to two decimal places, you can various options