TCS NINJA| Programming Logic

 

Programming Logic
  


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.    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

 

 

 

5      The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.
a) True
b) False

 

 

 

 

 

 

 

    Comments

    Popular posts from this blog

    TCS Ninja|Reasoning Ability

    TCS NINJA| Numerical Ability