mne = 5000
mesyc = 0
procent = 0.03
i = 0
while mesyc != 12:
mesyc += 1
x = (mesyc * mne) + (mne * procent)
print(mesyc,x)
print('Я заработал за год', x,'руб')
def salary(month, start_salary=5000, complex_percent=3.0):
return start_salary * pow(1 + complex_percent / 100, month - 1)
total = sum(print(f'{salary:.2f}') or salary for salary in map(salary, range(1, 12 + 1)))
print(f'Я заработал {total:.2f}')
mne = 5000
mesyc = 0
procent = 0.03
i = 0
while mesyc != 12:
mesyc += 1
mne += mne * procent
print(f'{mesyc} {mne:.2f}')
print(f'Я заработал за год {mne:.2f} руб')
# 1 5150.00
# 2 5304.50
# 3 5463.64
# 4 5627.54
# 5 5796.37
# 6 5970.26
# 7 6149.37
# 8 6333.85
# 9 6523.87
# 10 6719.58
# 11 6921.17
# 12 7128.80
# Я заработал за год 7128.80 руб