Computer Science, asked by parvathianil03, 9 months ago

four components of a loop

Answers

Answered by nasaarjunsoni
5

Answer: Loop statements usually have four components: initialization (usually of a loop control variable), continuation test on whether to do another iteration, an update step, and a loop body.

HOPE YOU GOT THE ANSWER

Answered by Anonymous
0

Loop:

  • Looping reduces the difficulty of complex problems to a manageable level.
  • It allows us to change the program's flow so that instead of writing the same code over and over, we can repeat it a limited amount of times.

The four elements of a Python while loop are as follows:

(i) Initialization expressions I initialization expressions (ii) initialization expressions (starting)

(ii) Put your expression to the test (reporting or stopping)

(iii) the loop's main body (doing)

(iv) change the expression (changing)

Similar questions