Вопрос задан 08.08.2018 в 10:36. Предмет Информатика. Спрашивает Иванов Кирилл.

Вы получили кредит на сумму A рублей под N% в сутки (проценты начисляются на сумму долга

ежедневно). Какую сумму в рублях вам придется вернуть через M дней? На входе в программу подаются А, N и M. Пример входных и выходных данных: входные данные 10000 1 45 выходные данные 15648.11Нам языке питон!!!!!
0 0
Перейти к ответам

Ответы на вопрос

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Карапетян Арменчик.
Python 3.Среда разработки Idle.Уточняйте вывод,если числа вводятся последовательностью,то лучше воспользоваться функцией split()

0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Task Analysis

The task requires calculating the amount to be repaid after a certain number of days when a loan of a certain amount at a certain daily interest rate is taken. The input includes the loan amount (A), the daily interest rate (N), and the number of days (M). The output should be the total amount to be repaid.

Approach

To calculate the total amount to be repaid, we can use the formula for compound interest: \[A = P(1 + \frac{r}{100})^n\] Where: - A = the amount of money accumulated after n days, including interest. - P = the principal amount (initial loan amount). - r = the daily interest rate. - n = the number of days.

Let's calculate the total amount to be repaid using the given formula.

Python Code

```python def calculate_total_repayment(A, N, M): # Calculate the total amount to be repaid total_amount = A * ((1 + N/100) ** M) return round(total_amount, 2)

# Example usage A = 10000 N = 1 M = 45 total_repayment = calculate_total_repayment(A, N, M) print(total_repayment) # Output: 15648.11 ```

The Python function `calculate_total_repayment` takes the loan amount (A), daily interest rate (N), and the number of days (M) as input and returns the total amount to be repaid.

Conclusion

Using the compound interest formula, we can calculate the total amount to be repaid after a certain number of days when a loan of a certain amount at a certain daily interest rate is taken.

0 0

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос