Embed presentation
Downloaded 12 times






The document describes how a while loop works in Python. It uses an example of a program that prints numbers from 1 to 4 using a while loop. The while loop initializes a variable x as 1, then checks if x is less than 5, prints x, and increments x by 1 each iteration, repeating until the condition x < 5 is no longer true when x becomes 5.





