Answer the question
In order to leave comments, you need to log in
Why is there no response?
from math import inf
# x - сумма вклада, k -процентная ставка,
# n - количество месяцев
def compute_income(deposit, interest_rate, amount_months):
try:
s = deposit * pow(1 + (interest_rate / (12 * 100))) ** amount_months
except:
s = inf
return s
# вычислить прибыль
x = float(1755)
print("Сумма вклада - ", x)
k = float(6)
print("Процент - ", k)
n = int(7)
print("Месяцы - ", n)
x_list = []
# вычислить прибыль с помощью функции
for h in range(1000, 50000):
income = compute_income(h, k, n) - x
x_list.append(income)
if income == x:
#вывести результат
print()
print(round(income))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question