Question: References: Section 2.2 of Application Developmentwith Swift Write a function that calculates the monthlypayment on an amortizing loan (e.g. a car loan) given
References:Section 2.2 of "Application Developmentwith Swift"
Write a function that calculates themonthlypaymenton an amortizing loan (e.g. a car loan) given theamount of the loan, theannual interest rateon the loan, and the loan period (number of monthlypayments).
For example, for a$100 000, 30-year loan at a 6% annual interest rate, themonthly payment would be $599.55.
Do a search on the web to findthe formulafor calculating amortizing loan payment.You may write your code on XCode or on a Swift Sandboxsuch as the one provided byhttps://www.weheartswift.com/swift-sandbox/orhttps://iswift.org/playground.After you write your function, test it with at least 2 test cases, including the example above.Note: you may use the built-inpow()function to do the exponentiation operation (e.g. to raise 5 to the power 2: pow(5, 2)).
Deliverables:
1. A copy of your code (both the function and test code that calls the function) in a text file.
2. Two screenshots showing your program execution for the two test cases.
PLS HElP with this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
