I have two variables (n;p) in two independent equations, one to find C and the other to find T. For the first iteration I assume the values of n and p finding C and T, now I have to find all the pairs of n and p that will make C=T. Additionally to being used as a constant, n will define the range for a list in the first equation and C is the sum of all the values on that list.
I was able to program the first iteration defining n and p as constants, thus finding C and T which were not equal to each other, but I don't know how to program the whole process so that it will repeat for a fix set of p (that will be a list and not a constant) and finding the n's that will make C=T. I have to iterate through p and for each one find one n that will satisfy the condition. Therefore I need to make a for loop inside a for loop inside a for loop. It will be something like this:
for all the values of p in range (0, 12, 0.1) do:
for all the values of n in range(0, 160, 0.001) do:
"the rest of the operation that also has for loop in it"
that operation will result in C and T, then,
if C = T
print(p and n) # the pair (p;n) that made it possible
As you can see that's an idea, not actual code, I don't know how to write the actual code for it. I saw something about a zip function but still don't get it. Help.