def future_value(current_value,apr,years): new_value = current_value for i in range(years): new_value = new_value * (1 + apr) return new_value def print_future_value(current_value,apr,years,future_value): print "The future value of a", current_value, "investment with APR", apr, "after",years,"years is",future_value if __name__ == '__main__': # should be 1191.016 print_future_value(1000,.06,3,future_value(1000,.06,3)) # should be 1000 print_future_value(1000,.06,0,future_value(1000,.06,0)) # should be 1000 print_future_value(1000,0,3,future_value(1000,0,3)) # should be 0 print_future_value(0,.06,3,future_value(0,.06,3)) cd_1_val = future_value(1000,.06,3) cd_2_val = future_value(1500,.03,3) total = cd_1_val + cd_2_val #Suze Orman example - 45 year old woman with $74K in retirement to buy a $6400 pool? #Denied! If she invests this now at APR 4% and retires at 65, she would have this much #more money print_future_value(6400,.04,20,future_value(6400,0.04,20))