exDotaPro

27_july_2019_1_savings

Jan 5th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. income = float(input())
  2. months = int(input())
  3. expenses = float(input())
  4.  
  5. unexpected_expenses = income * 0.30
  6. monthly_savings = income - (expenses + unexpected_expenses)
  7. total_savings = monthly_savings * months
  8. percent = (monthly_savings / income) * 100
  9.  
  10. print(f'She can save {percent:.2f}%\n{total_savings:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment