# Write a function futval(principal, apr, numyears) that returns the future value of principal dollars invested for numyears

Fantastic news! We've Found the answer you've been seeking!

## Question:

Write a function futval(principal, apr, numyears) that returns the future value of principal dollars invested for numyears at an annual interest rate of apr. Then use this function to complete a program that allows a user to compare two investments at differing interest rates. The user will enter the amount to invest (principal), the number of years of the investment, and two different interest rates. The program should then report the difference in future values between the two investments.

**Related Book For**

## Artificial Intelligence A Modern Approach

ISBN: 978-0137903955

2nd Edition

Authors: Stuart J. Russell and Peter Norvig