homework2 for computation invest