Answer the question
In order to leave comments, you need to log in
How to solve a math problem with python?
There is such a task from the Unified State Examination in mathematics, just for the sake of interest I wanted to solve it with the help of python. I know the problem itself how to solve it manually, but at the same time I wanted to improve my knowledge of python. Thanks in advance for your help. I will not publish my shameful code. Normal people don't need to see this.
Answer the question
In order to leave comments, you need to log in
This is not a programming problem, but a math problem. The solution is one formula.
First, solve the equation, at what value of the contribution X will the income from the paper and from the bank deposit be the same?
1.1X+2000 = 1.12X
Before this amount, it is more profitable to take paper - after - a deposit.
Next, you need to take one of the two 4 times, comparing the current amount with the threshold value above.
From Python, you need to be able to perform an action 4 times:
Compare 2 values and do different actions depending on this.
for i in range(0, 4):
if a < b:
foo
else:
bar
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question