NPV and IRR calculations should be implemented as functions. At a minimum, the NPV function should accept a list of cash flows and a discount rate, and the IRR function should accept a list of cash flows and a guess at the IRR.
Description: Write a program that determines whether you should accept or reject a project using Net Present Value (NPV) and Internal Rate of Return (IRR). Use the following formulas for NPV and IRR, respectively:
NPV:
NPV = Σ CF / (1 + r)^n
Requirements:
1. Functions: NPV and IRR calculations should be implemented as functions. At a minimum, the NPV function should accept a list of cash flows and a discount rate, and the IRR function should accept a list of cash flows and a guess at the IRR.