Basics
1.

Is Python case sensitive when dealing with identifiers?

A.  

yes

B.  

no

C.  

machine dependent

D.  

none of the mentioned

2.

What is the maximum possible length of an identifier?

A.  

31 characters

B.  

63 characters

C.  

79 characters

D.  

none of the mentioned

3.

Which of the following is invalid?

A.  

_a = 1

B.  

__a = 1

C.  

__str__ = 1

D.  

none of the mentioned

4.

Which of the following is an invalid variable?

A.  

my_string_1

B.  

1st_string

C.  

foo

D.  

_

5.

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

6.

Which of the following is not a keyword?

A.  

eval

B.  

assert

C.  

nonlocal

D.  

pass

7.

All keywords in Python are in _________

A.  

lower case

B.  

UPPER CASE

C.  

Capitalized

D.  

None of the mentioned

8.

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

9.

Which of the following is an invalid statement?

A.  

abc = 1,000,000

B.  

a b c = 1000 2000 3000

C.  

a,b,c = 1000, 2000, 3000

D.  

a_b_c = 1,000,000

10.

Which of the following cannot be a variable?

A.  

__init__

B.  

in

C.  

it

D.  

on