Python Programming (2180711) MCQ

MCQs of Introduction to Python

MCQ No - 1

Is Python case sensitive when dealing with identifiers?

(A) yes
(B) no
(C) machine dependent
(D) none of the mentioned

A
MCQ No - 2

What is the maximum possible length of an identifier?

(A) 31 characters
(B) 63 characters
(C) 79 characters
(D) Any length

D
MCQ No - 3

Which of the following is invalid?

(A) _a = 1
(B) __a = 1
(C) __str__ = 1
(D) none of the mentioned

D
MCQ No - 4

Which of the following is an invalid variable?

(A) my_string_1
(B) 1st_string
(C) foo
(D) _

B
MCQ No - 5

Which of the following is true for variable names in Python?

(A) unlimited length
(B) all private members must have leading and trailing underscores
(C) underscore and ampersand are the only two special characters allowed
(D) none of the mentioned

A