nerdexam
Huawei

H13-311_V3.5 · Question #28

The continue statement in the Python language is used to jump out of this loop and then continue to execute the next round of statements.

The correct answer is A. True. Option A is correct because the continue statement tells Python to skip the remaining statements in the current loop iteration and immediately move on to the next iteration, which is precisely "jumping out of the current round" and continuing execution with the next one. For…

Machine Learning Basics

Question

The continue statement in the Python language is used to jump out of this loop and then continue to execute the next round of statements.

Options

  • ATrue
  • BFalse

How the community answered

(23 responses)
  • A
    83% (19)
  • B
    17% (4)

Explanation

Option A is correct because the continue statement tells Python to skip the remaining statements in the current loop iteration and immediately move on to the next iteration, which is precisely "jumping out of the current round" and continuing execution with the next one. For example, in a for loop, hitting continue does not exit the loop - it abandons only what is left of that pass through the loop body and restarts from the top with the next value.

Option B is wrong because it would imply continue either exits the loop permanently or has some other behavior, neither of which is true; that role belongs to break, which terminates the loop entirely.

Memory tip: Contrast the two keywords by their names - break breaks out of the loop for good, while continue continues the loop by moving to the next iteration, skipping whatever is left in the current one.

Topics

#Python#continue statement#loop control#control flow

Community Discussion

No community discussion yet for this question.

Full H13-311_V3.5 Practice