I
I
Ivan Kambur2020-07-15 16:47:05
Python
Ivan Kambur, 2020-07-15 16:47:05

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))


It is not necessary to help with the task, but I will not refuse help) Thank you in advance

Task:
Choose such an INTEGRATE value of the initial deposit in order to make a profit of 1755.0 rubles in 7.0 months, if the annual interest rate is 6.0%.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question