Computer Science
Assertion. The break statement can be used with all selection and iteration statements.
Reason. Using break with an if statement will give no error.
Python Funda
3 Likes
Answer
(e)
Both Assertion and Reason are false.
Explanation
In python, the break statement can be used with iteration statements only. Using break with conditional statements will result in syntax error — SyntaxError: 'break' outside loop
Answered By
2 Likes
Related Questions
Assertion. if and for are legal statements in Python.
Reason. Python is case sensitive and its basic selection and looping statements are in lower case.
Assertion. The break statement can be used with all selection and iteration statements.
Reason. Using break with an if statement is of no use unless the if statement is part of a looping construct.
What are tokens in Python ? How many types of tokens are allowed in Python ? Exemplify your answer.
How are keywords different from identifiers ?