How to write this do...while from C++ to Python??
I looked at a lot of topics, but I don’t understand how to write with such functionality
do
{ L = 0; x = a; h = h / 2;
while (x < b) {
y1 = fC(x);
y2 = fC(x+h);
L = L + sqrt(h * h + (y2-y1) * (y2-y1));
x = x + h;
}
L = L * 2;
}
while (fabs(L0 - L) / L0 > 0.0001);