Computer Science, asked by gcsekar76, 6 months ago

explain the general form of " for loop"and "while loop" with python program​

Answers

Answered by laxmikant33345
1

Answer:

Here, val is the variable that takes the value of the item inside the sequence on each iteration. Loop continues until we reach the last item in the sequence. The body of for loop is separated from the rest of the code using indentation

Answered by queen7197
1

Answer:

The for-loop, written as [initial] [increment] [limit] { ... } for initialises an internal variable, executes the body as long as the internal variable is not more than limit (or not less, if increment is negative) and, at the end of each iteration, increments the internal variable. While loops, like the ForLoop, are used for repeating sections of code - but unlike a for loop, the while loop will not run n times, but until a defined condition is no longer met. If the condition is initially false, the loop body will not be executed at all.

Explanation:

plz Mark me as aa brainliest I need help plz

Similar questions