Question

    What is the purpose of the break statement in Python?

    A To exit a loop prematurely Correct Answer Incorrect Answer
    B To skip to the next iteration of a loop Correct Answer Incorrect Answer
    C To repeat a loop Correct Answer Incorrect Answer
    D To define a function Correct Answer Incorrect Answer
    E To import a module Correct Answer Incorrect Answer

    Solution

    Explanation: The break statement is used to exit a loop prematurely, meaning that the loop will stop executing and the program will move on to the next line of code after the loop

    Practice Next