Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

All keywords in Python are in

A. lower case
B. UPPER CASE
C. Capitalized
D. None of the mentioned
Answer» E.
2.

Which of the following is not a keyword?

A. eval
B. assert
C. nonlocal
D. pass
Answer» B. assert
3.

Why are local variable names beginning with an underscore discouraged?

A. they are used to indicate a private variables of a class
B. they confuse the interpreter
C. they are used to indicate global variables
D. they slow down execution
Answer» B. they confuse the interpreter
4.

Which of the following is an invalid variable?

A. my_string_1
B. 1st_string
C. foo
D. _
Answer» C. foo
5.

Which of the following is invalid?

A. _a = 1
B. __a = 1
C. __str__ = 1
D. none of the mentioned
Answer» E.
6.

none of the mentioned

A. 31 characters
B. 63 characters
C. 79 characters
D. none of the mentioned
Answer» E.
7.

Is Python case sensitive when dealing with identifiers?

A. yes
B. no
C. machine dependent
D. none of the mentioned
Answer» B. no