3). Which of the following is invalid?

[A]_a = 1
[B]__a = 1
[C]__str__ = 1
[D]none of the mentioned

Show Answer

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

Show Answer

7). All keywords in Python are in _________

[A]lower case
[B]UPPER CASE
[C]Capitalized
[D]None of the mentioned

Show Answer

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

Show Answer

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

Show Answer