<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT size=2>Since you are updating the principal value each year, use the 
following to grow the principal by the interest rate each year:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><STRONG>principal = principal * (1 + apr)</STRONG></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV>
<DIV><FONT size=2>-Mark</FONT></DIV></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"bob gailer" &lt;<A 
  href="mailto:bgailer@gmail.com">bgailer@gmail.com</A>&gt; wrote in message <A 
  href="news:49761FDC.5020800@gmail.com">news:49761FDC.5020800@gmail.com</A>...</DIV>Donna 
  Belle Ibarra wrote: 
  <BLOCKQUOTE 
  cite=mid:fbcbd4f40901201004j5ba7654fha68628b2fe8faa34@mail.gmail.com 
  type="cite">Hi! I need help with program exericse #6 entitled "Futval.py" 
    which is a program that computes the value of an investment carried 10 years 
    into the future.<BR><BR>This is the coding I have.. yet it does not seem to 
    spit out the correct numbers (Am I using an incorrect 
  equation?)<BR></BLOCKQUOTE><BR>Take a look at <A class=moz-txt-link-freetext 
  href="http://en.wikipedia.org/wiki/Time_value_of_money#Present_value_of_a_future_sum">http://en.wikipedia.org/wiki/Time_value_of_money#Present_value_of_a_future_sum</A> 
  for the various formulas. I am not sure which applies in your case.<BR><BR>
  <BLOCKQUOTE 
  cite=mid:fbcbd4f40901201004j5ba7654fha68628b2fe8faa34@mail.gmail.com 
  type="cite"><BR><B>def main():<BR>&nbsp;&nbsp;&nbsp; print "This program 
    calculates the future value"<BR>&nbsp;&nbsp;&nbsp; print "of a 10-year 
    investment."<BR><BR>&nbsp;&nbsp;&nbsp; principal = input("Enter the amount 
    invested each year: ")<BR>&nbsp;&nbsp;&nbsp; apr = input("Enter the annual 
    interest rate: ")<BR>&nbsp;&nbsp;&nbsp; years = input("Enter the number of 
    years: ")<BR><BR>&nbsp;&nbsp;&nbsp; for i in range (1, years + 
    1):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; principal = principal * (1 
    + apr)**i<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "The value 
    in", i, " years is:", principal<BR><BR>main()</B><BR><BR>The output is 
    suppose to appear like this:<BR><BR>This program calculates the future value 
    of a 10-year investment.<BR>Enter the amount invested each year: 
    100.00<BR>Enter the annual interst rate: 0.05<BR>Enter the number of years: 
    10<BR>The value in 1 years is 105.0<BR>The value in 2 years is 215.25<BR>The 
    value in 3 years is 331.0125<BR>The value in 4 years is 
    452.563125<BR><BR>And so on..<BR><BR>^Please help me!!!<BR><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
Tutor maillist  -  <A class=moz-txt-link-abbreviated href="mailto:Tutor@python.org">Tutor@python.org</A>
<A class=moz-txt-link-freetext href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</A>
  </PRE></BLOCKQUOTE><BR><BR>
  <DIV class=moz-signature>-- <BR>Bob Gailer<BR>Chapel Hill 
  NC<BR>919-636-4239</DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Tutor maillist&nbsp; 
  -&nbsp; 
Tutor@python.org<BR>http://mail.python.org/mailman/listinfo/tutor<BR></BLOCKQUOTE></BODY></HTML>