A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

1. Is Python case sensitive when dealing with identifiers?
a. yes
b. no
c. machine dependent
d. none of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (a).yes

2. What is the maximum possible length of an identifier?
a. 31 characters
b. 63 characters
c. 79 characters
d. none of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (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
View Answer Report Discuss Too Difficult!
Answer: (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
View Answer Report Discuss Too Difficult!
Answer: (a).they are used to indicate a private variables of a class

5. All keywords in Python are in
a. lower case
b. UPPER CASE
c. Capitalized
d. None of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (d).None of the mentioned

6. 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
View Answer Report Discuss Too Difficult!
Answer: (a).unlimited length

7. 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
View Answer Report Discuss Too Difficult!
Answer: (b).a b c = 1000 2000 3000

8. Which of the following cannot be a variable?
a. __init__
b. in
c. it
d. on
View Answer Report Discuss Too Difficult!
Answer: (b).in

9. Which is the correct operator for power(x^y)?
a. X^y
b. X**y
c. X^^y
d. None of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (b).X**y

10. Which one of these is floor division?
a. /
b. //
c. %
d. None of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (b).//

Page 1 of 10