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
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
Physics,
2 months ago
Science,
2 months ago
Social Sciences,
4 months ago
English,
10 months ago
Math,
10 months ago