x = 0 while x < 5: print(x) x += 1 #the x += 1 expression is a shortend version for x = x + 1
if a == 2: # Compares whether a is equal to 2 print a
x = 0 while x < 5: print(x) x += 1
# in python == means that is a comparisson operator meaning it compares if one # variable equals the other. Instead of using one = since that will assign # a value we use ==