Advertisement
Guest User

Savings

a guest
Mar 28th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. monthly_income = float(input())
  2. months_for_save = int(input())
  3. personal_needs_money = float(input())
  4.  
  5. unexpected_needs = monthly_income * 0.3
  6. saved_money = monthly_income - personal_needs_money - unexpected_needs
  7.  
  8. total_saved = months_for_save * saved_money
  9. percent_total_saved = saved_money / monthly_income * 100
  10.  
  11. print(f"She can save {percent_total_saved:.2f}%\n{total_saved:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement