Question:

Which of the following is the correct identifier?

Show Hint

Python is case-sensitive,
so `break` is a keyword but `Break` can be used as an identifier.
Always avoid using names similar to keywords for clarity.
  • global
  • Break
  • def
  • with
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

In Python, an identifier is a name used to identify a variable, function, class, module, or object.
An identifier must not be a reserved keyword or built-in keyword in Python.
Options (A) global, (C) def, and (D) with are all Python keywords, so they cannot be used as identifiers.
Option (B) Break starts with an uppercase `B`, so it is not the same as the lowercase break keyword.
Python is case-sensitive, so Break is not a keyword — it is a valid identifier.
Therefore, the correct answer is option (B).
Was this answer helpful?
0
0

Top Questions on Programming in Python

View More Questions

Questions Asked in CBSE CLASS XII exam

View More Questions