title: How can I change this to not allow a negative number in the final count?
body: <p>I'm having an issue with this assignment. It's something where the last week won't adjust the final interest/principal payment so that the balance can't go below zero. I thought that making my code <code>while startBalance &gt; 0</code> would stop it would allowing that?</p>
  
  <pre><code>price = float(input("Enter the purchase price: "))
  down = .10
  apr = .12
  monthlyRate = .05
  month = 0
  downPayment = price * down 
  startBalance = price - downPayment
  payment = startBalance * monthlyRate
  
  print("%s%19s%18s%19s%10s%17s" % ("Month", "Starting Balance", "Interest to Pay", "Principal to Pay", "Payment", "Ending Balance"))
  
  while startBalance &gt; 0:
      month += 1
      interest = startBalance * apr / 12
      principal = payment - interest
      endBalance = startBalance - principal
  
  
      print("%2d%16.2f%16.2f%18.2f%18.2f%15.2f" % (month, startBalance, interest, principal, payment, endBalance))
  
      startBalance = endBalance
  </code></pre>