Test Index
CBSE Class 12 Computer Science 2025 Paper Set 4
© examsnet.com
Question : 4 of 37
Marks:
+1,
-0
Which of the following is the correct identifier ?
Solution:
Concept:An identifier is a name for a variable, function, etc. It must start with a letter or underscore, may contain letters, digits and underscores, and must not be a keyword. Python is case-sensitive.Explanation:
global, def and with are Python keywords, so they cannot be used as identifiers.Break (capital B) is not the same as the keyword break, so it is a valid identifier.>>> import keyword>>> [w for w in ['global', 'Break', 'def', 'with'] if keyword.iskeyword(w)]['global', 'def', 'with']Key point: Keywords are all lowercase (except
True, False, None); changing the case makes a valid identifier.Answer:Option B (Break)© examsnet.com
Go to Question: