Need help converting do while in C++ to while in Python

hello! I have a do while loop in c plus plus that i need help turning into a while loop in python. Thank you

Float computeRoot(float root, int index){

Float tp, mid, low = 0.0, high = root;

do {

mid = (low + high) / 2;

if (computePower(mid, index) > root){ //compute power is another function

high = mid;
}
else{

low = mid;
}

mid = (low + high) / 2;

tp = (computePower(mid, index) - root);

if (tp < 0)
tp = -tp;

}

}

while (tp > .000005);

return mid;

}