If Conditionals 2

If Conditions Inside A Loop

When performing iterative logic in a loop, if statements can be used inside of the loop's code block. These statements can be used to change the expression on which the loop itself operates.

xSet = True

x = 0

while (xSet):

x = x * 1

if (x > 10):

xSet = False