Get startedGet started for free

Two project with different lifespans

The board of the company has decided to go a different direction, involving slightly shorter term projects and lower initial investments.

Your project managers have come up with two new ideas, and projected the cash flows for each of the proposals.

Project 1 has a lifespan of 8 years, but Project 2 only has a lifespan of 7 years. Project 1 requires an initial investment of $700,000, but Project 2 only requires $400,000.

The cash flow projections for both projects are as follows:

Year Project 1 Project 2
1 -$700 (initial investment) -$400 (initial investment)
2 $100 (cash flow) $50 (cash flow)
3 $150 $100
4 $200 $150
5 $250 $200
6 $300 $250
7 $350 $300
8 $400 N / A

This exercise is part of the course

Introduction to Financial Concepts in Python

View Course

Exercise instructions

  • Create a variable cf_project_1 and set it equal to a numpy array of the projected cash flows for Project 1.
  • Repeat the process for Project 2, setting it equal to cf_project_2.
  • Scale the original values by 1000x, i.e. multiply the original arrays by 1000.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

import numpy as np

# Create a numpy array of cash flows for Project 1
cf_project_1 = ____

# Create a numpy array of cash flows for Project 2
cf_project_2 = ____

# Scale the original objects by 1000x
cf_project1 = ____
cf_project2 = ____
Edit and Run Code