title: Program for tuition per semester
body: <p>I am writing a program for tuition. My problem/question is: How can I get the total for just the four years instead of writing out the numbers like I did total+=(8240+8487.20+8741.82+9004.07)*2</p>
  
  <pre><code>'''
  CPS 313: Assignment 3, problem 3
  
  At one college, the tuition for a full time student
  is $8,000 per semester. It has been announced that the
  tuition will be increased by 3% each year for the next 5 years.
  Write a program with a loop that displays the projected semester
  tuition amount for the next 5 years, and the total cost of 4
  years' worth of tuition starting from now.
  '''
  
  def main():
      tuition = 8000.00
      total = 0
  
      print("Year\t", "Tuition per semester")
  
      for i in range(1,6):
          #Tuition increased by 3% each year for the next 5 years
          tuition += tuition*0.03
          #Displays tuition fee for each year
          print(i,'\t',format(tuition, '.2f'))
  
      total += (8240+8487.20+8741.82+9004.07)*2
      print("Total tuition in 4 years: $", format(total,\
            '.2f'),sep = '')
  
  main()
  
  '''
  Output:
  Year     Tuition per semester
  1        8240.00
  2        8487.20
  3        8741.82
  4        9004.07
  5        9274.19
  Total tuition in 4 years: $68946.18
  '''
  </code></pre>