title: calculating amount of months needed to save for house down payment
body: <p>Write a program to calculate how many months it will take you save up enough money for a downpayment.  Like before, assume that your investments earn a return of r = 0.04 (or 4%) and the
  required down payment percentage is 0.25 (or 25%).  Have the user enter the following variables:</p>
  
  <ol>
  <li>The starting annual salary (annual_salary)</li>
  <li>The percentage of salary to be saved (portion_saved)</li>
  <li>The cost of your dream home (total_cost)</li>
  <li>The semi­annual salary raise (semi_annual_raise)em</li>
  </ol>
  
  <p>This should be the right results:
  But <strong>My program passes the first test but off by one month in other two, I can't find a solution</strong></p>
  
  <p>Test Case 1  </p>
  
  <pre><code>Enter your starting annual salary: 120000
  Enter the percent of your salary to save, as a decimal: .05
  Enter the cost of your dream home: 500000
  Enter the semi­annual raise, as a decimal: .03
  Number of months: 142 
  </code></pre>
  
  <p>Test Case 2 </p>
  
  <pre><code>Enter your starting annual salary: 80000
  Enter the percent of your salary to save, as a decimal: .1
  Enter the cost of your dream home: 800000
  Enter the semi­annual raise, as a decimal: .03
  Number of months: 159 
  </code></pre>
  
  <p>Test Case 3 </p>
  
  <pre><code>Enter your starting annual salary: 75000
  Enter the percent of your salary to save, as a decimal: .05
  Enter the cost of your dream home: 1500000
  Enter the semi­annual raise, as a decimal: .05
  Number of months: 261 
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>annual_salary = int(input("Salary: "))
  portion_saved = float(input("Percentage to save: ")) 
  total_cost = int(input("Cost of the house: "))
  portion_down_payment = total_cost * 0.25
  current_savings = 0
  rate = 0.04
  number_of_months = 0
  semi_annual_raise = float(input("Raise: "))
  
  while current_savings &lt;= portion_down_payment:
      current_savings += annual_salary * portion_saved / 12
      current_savings += current_savings * rate / 12
      number_of_months += 1
      if number_of_months % 6 == 0:
          annual_salary += annual_salary * semi_annual_raise
      print(number_of_months, current_savings)
  
  print("Enter your annual salary: ", annual_salary)  
  print("Enter the percent of your salary to save, as a decimal: ", portion_saved)
  print("Enter the cost of your dream home: ", total_cost) 
  print("Number of months: ", number_of_months)    
  </code></pre>