Computer Science, asked by subendransubanu, 4 months ago

differentiate continue statement from break statement​

Answers

Answered by dynamo3026
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 atrs7391
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