points = 0 while points != 10: points += 1 # or points = points + 1 print(points)
Here is what the above code is Doing:
1. It creates a variable called points and assigns it the value 0.
2. It enters a while loop.
3. It adds 1 to the value of points.
4. It prints the value of points.
5. It checks whether the value of points is equal to 10. If it is, the while loop ends. If it isn’t, the while loop repeats from step 3.