Advertisement
maximkeremet

Untitled

Dec 9th, 2022
832
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. profit = 0
  2. deposit = 500
  3. years = list(range(1,6))
  4.  
  5. for year in years:
  6.     if year == 1:
  7.         profit += 500 * (1 + 0.11)
  8.     else:
  9.         profit = profit * (1 + 0.11)
  10.     print(profit)
  11. print(f"Сумма вклада через {year} лет увеличится на {profit-deposit} и составит {profit} рублей")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement