Guest User

Untitled

a guest
Jan 19th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. while (high - low) >= epsilon:
  2.  
  3. for month in range(1,13):
  4. balance2 = (balance2 - ans)*(1.0 + monthlyinterestrate)
  5.  
  6. if balance2 <= epsilon:
  7. low = ans
  8. else:
  9. high = ans
  10. ans = (high + low)/2.0
Add Comment
Please, Sign In to add comment