Python tokens, identifiers, variables and comments Theory part 1
What We'll Learn
A quick overview of today's lecture
Python tokens, identifiers, variables and comments Theory part 1
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 types9 included0 excluded
Flagged questions are excluded from Study Notes, PPT, and Student Notes references until corrected in Paper Analyzer.
Included
ID 1066 · 2025 · 1 mark(s)
Which of the following is a valid variable name?
a) if
b) pass
c) roll no
d) age
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1070 · 2025 · 1 mark(s)
What type of error is caused by misspelled keyword?
a) Logical
b) Runtime
c) Syntax
d) Compilation
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1075 · 2025 · 1 mark(s)
Run Time error occurs due to
a) Wrong Syntax
b) Misspelled Keyword
c) Logical Mistake
d) Illegal operations during execution
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1109 · 2025 · 1 mark(s)
Which of the following is not a token?
a) keyword
b) identifier
c) expression
d) operator
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1195 · 2025 · 1 mark(s)
Which of the following is/are not a valid identifier?
a) Mybook
b) @book
c) _book
d) book#
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1202 · 2025 · 1 mark(s)
In Python, which keyword is used to exit a loop prematurely?
A. exit
B. stop
C. break
D. terminate
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1231 · 2025 · 1 mark(s)
Identify the valid identifiers from the following:
(a) Abc
(b) if
(c) WHILE
(d) 1_g
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1254 · 2025 · 1 mark(s)
Identify the invalid keyword in Python from the following:
(a) for
(b) import
(c) none
(d) break
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments
Included
ID 1337 · 2025 · 1 mark(s)
Which of the following is the correct identifier?
A) continue
B) Break
C) -student
D) mark$
Python Basics and Data Concepts → Python tokens, identifiers, variables and comments