I am trying to convert a particular JavaScript code into Python code. There is one part I do not understand. This is the JavaScript code:
do {
// something
} while (a > 0.01);
b = 10
I tried to replicated it by:
for i in range(1000): # or: while True:
// something
if (a > 0.01):
continue
else:
break
b = 10
But looks like I am wrong.
Can somebody tell me what am I doing wrong in the upper python code? Thank you.
EDIT: The problem is not with "for i in range(1000)" instead of "while True".