Answer:
The while loop is executed one more time when num_insects is 64. It gets doubled and 128 gets printed. Then the while loop is not executed anymore since 128 exceeds 100.
So the reason you see 128 is because the multiplication by 2 happens inside the loop before you print. You enter it with 64, but by the time you get to the print statement, it was already multiplied.
The solution is to switch the print and the multiply:
num_insects = 8 # Must be >= 1
while num_insects <= 100 :
print(num_insects,'', end="")
num_insects = num_insects * 2
This has one added advantage that the very first print statement outside the loop can be removed.