1 | initial version |
Apart from the good answer given by @ndomes , here are some codes:
In eq1, correct the sign between P and emi (and I think the number of "variables to solve for" should be atleast equal to number of equations to get a solution):
P, emi, rate, duration = var("P emi rate duration")
eq1 = P == emi * (( 1 + rate / 100)^ duration - 1) / (rate / 100) / (1 + rate /100)^ duration
solve([eq1, P == 100, duration == 2, rate == 10], [emi, P, duration, rate])
The below code is same but visually different:
P, emi, rate, duration = var("P emi rate duration")
eq1 = P == emi * (( 1 + rate / 100)^ duration - 1) / (rate / 100) / (1 + rate /100)^ duration
eq3 = P == 100
eq4 = duration == 2
eq5 = rate == 10
solve([eq1, eq3, eq4, eq5], [emi, P, duration, rate])