Python Exercises for Corporate Finance and Risk Management

6 / 26

Question: 46

Q: Consider the three projects A, B, and C, as shown here. If the opportunity cost of capital is 10%, which of these projects has a positive NPV.

enter image description here

INSTRUCTIONS

In this question, we are given three project A,B,C which contains different cash flows and we have to calculate the NPV (Net Present Value) of the cash flows. We are given the opportunity cost of capital of 10%.

  • Define a function with the name "npv" which will take two arguments, list of cash flows and opportunity cost.
  • The signature of the function should be like:

def npvf(cfList,r):

  • Use while loop to access the value of cash flows

  • For more understanding and instruction please follow the previous question.



Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...