I have a while loop question that is stumping me. Below is a simple illustration of what is happening in my code - I ask the while loop to stop when the condition is less than, but it gives the values as if it stated less than or equal to. Does anyone know what i have done wrong?
A = 10.0
B = 20.0
x = 1.0
while ((A < 13.0) and (B < 23.0)):
A += x
B += x
print(A, B)
if x > 100.0:
break
x += 1.0
print(x)