History, asked by gcsekar76, 1 month ago

explain the general form of " for loop" and " while loop" with python program
explain for loop, general form, program and out put this program

Answers

Answered by multitasking
0

Answer:

For Loop: 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 Loop: In most computer programming languages, a while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement.

Similar questions