Where will you use while rather than for?
Answer / Suraj Singh
You would use the `while` loop instead of the `for` loop when you don't know how many iterations are needed to complete a task, or when you need to repeatedly execute a block of code until a certain condition is met. For example, in a game where the player can keep playing until they choose to quit.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the encapsulation?
What is none literal in python?
Write a small code to explain repr() in python ?
What is an operator in python?
What are data frames, exactly?
What is abstract class in python?
What is the use of map in python?
Do lists start at 0 or 1?
Is python duck typed?
How do you show hello world in python?
What is a method call?
What does time time () do in python?