Python While
Loops
Python While Loops
• While loops are control flow tools.
• Like for loops, they are used to iterate over a
block of code.
• Unlike for loops, they will repeat that block of code
for an unknown number of times until a specific
condition is met.
• You’ll use while loops when you’re not sure how
many times you need your code to repeat.
Syntax of while Loop
Example
Example
Print all the Numbers Divisible by 3
Break
Break
continue
continue
Print Vowels Count
Vowels Count
To Enter a Number and Print its Reverse
To Calculate the Factorial of a Number
Multiplication Table
Thank You