- Home
- Assessment

8 / 26

```
Q: Compute the present value of $1 received after 6-years, if your opportunity cost of capital is 12%.
```

```
We have to find out the current value of $1 that we will get after 6 years, where opportunity cost is given that is 12%.
- Define a function called "NPV" in python taking values of cash flow and opportunity cost.
- Use simple formula of discount cash flow.
Present_value = amount / (pow((1 + rate / 100), time))
Where:
Amount = $1
Rate = 12%
Time = 6 years
```

XP

Taking you to the next exercise in seconds...

Want to create exercises like this yourself? Click here.

Checking Please wait.

Success

Error

Fetching hint, please wait...

Error

Fetching answer, please wait...

Error

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

## Loading comments...