Computer Science, asked by agaur598, 10 months ago

Explain while loop in Python programming language.

Answers

Answered by Anonymous
3

Answer:

python, while loop is used to execute a block of statements repeatedly until a given a condition is satisfied. And when the condition becomes false, the line immediately after the loop in program is executed.

Answered by letmeanswer12
1

The details of while loop in Python programming language

Explanation:

In python, while loop is used to execute a sequence of statements repeatedly until a given condition is satisfied.

  • Syntax : while expression:

 statement(s)

  • Here, a statement(s) may be a single statement or a statement block. The condition can be any expression, and true is any value other than zero. The iterates the loop while the condition is valid. Once the condition is false the control of the program transfers immediately after the loop to the line.
  • There, the key point of the while loop is that the loop will not ever run, the loop body will be skipped and the first sentence after the while loop will be executed when the condition is checked and the result is false.

Similar questions