English, asked by ramdasninaniya189, 3 months ago

A while loop in Python is used for what type of iteration ?
1) Definite
2) Indefinite
3) Discriminant
4) Indeterminate

Answers

Answered by arpitab393
10

Answer:

2 ) Indefinite

In , python indefinite iteration is performed with a while loop .

if this answer has helped you please mark me as a brainliest .

Answered by krishnaanandsynergy
1

A while loop in Python is used for indefinite iterations.

Explanation:

  • In Python, the while loop is used to cycle over a block of program as long as the condition (test expression) is true.
  • When we don't know how many times to iterate ahead of time, we often use this loop.
  • While's Syntax while test expression is running, loop through the following steps:

                  while (condition):

                         body

  • Test expression is verified first in the while loop. If the test expression evaluates to True, the body of the loop is entered. The test expression is verified one again after one iteration. Until the test expression evaluates to False, the operation continues.
  • In Python, indentation determines the body of the while loop.
  • The indentation in the body begins at the top and ends at the bottom with the first unindented line.
Similar questions