Python tokens, identifiers, variables and comments Theory part 2
What We'll Learn
A quick overview of today's lecture
Python tokens, identifiers, variables and comments Theory part 2
Concept ID: XI_U2_TOKENS_IDENTIFIERS_VARIABLES_COMMENTS.
Primary Sub-subtopic: Python tokens, identifiers, variables and comments.
Question-bank grouping: Python Basics and Data Concepts.
Use this lecture for theory, examples, misconceptions, and short PYQ checks mapped to this concept ID.
Key things we'll cover
Python tokens, identifiers, variables and comments
PYQ references used by all prompt types8 included0 excluded
Flagged questions are excluded from Study Notes, PPT, and Student Notes references until corrected in Paper Analyzer.
Included
ID 1353 · 2025 · 1 mark(s)
Assertion (A): In Python, None is the same as 0 and used to represent zero.
Reason (R):The keyword None is used in Python to denote the absence of a value or a null value.
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1382 · 2025 · 1 mark(s)
Which of the following is an invalid identifier in Python?
(a) price
(b) _discount
(c) 2ndValue
(d) salePrice
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1426 · 2025 · 1 mark(s)
Which of the following is an invalid identifier in Python?
(a) Sumval
(b) Fibo_val
(c) Cust#ID
(d) EmpName
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1471 · 2025 · 1 mark(s)
Which of the following is an invalid identifier in Python?
(a) classes
(b) Class10
(c) class_name
(d) class
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1515 · 2025 · 1 mark(s)
Which of the following is a valid identifier in Python?
(a) _Numval
(b) 2Fact
(c) RollNo.
(d) Star@Title
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1557 · 2025 · 1 mark(s)
Which of the following is a valid Python identifier?
(a) 2variable
(b) var_1
(c) for
(d) @name
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1238 · 2025 · 2 mark(s)
Which of the following are valid variable names in Python? Justify.
(i) 23data
(ii) _counter
(iii) my-variable
(iv) TotalSum
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1549 · 2025 · 2 mark(s)
(b) Write any four naming rules of an identifier in Python.
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments