differentiate continue statement from break statement
Answers
Answered by
1
Answer:
The break statement terminates the whole iteration of a loop whereas continue skips the current iteration. The break statement terminates the whole loop early whereas the continue brings the next iteration early.
Explanation:
PLEASE MARK ME AS BRAINIIEST
Answered by
1
Break command terminates/breaks the loop whereas Continue terminates only the current iteration of the loop and skips into next iteration.
Example:
n=5
while (n>0):
print (n,=end' ')
______
n = n-1
The output will be if the blank space has Break => 5
The output will be if the blank space has Continue => 5 5 4 3 2 1
Similar questions
Math,
2 months ago
English,
2 months ago
English,
2 months ago
Math,
4 months ago
Business Studies,
4 months ago
Math,
11 months ago
Social Sciences,
11 months ago