πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      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
      ask-question