Python Test

More Python Tests

Question 1: Which of the following is an incorrect syntax?

Question 2: The value of __name__ attribute of a module may be equal to main if _____.

Question 3: What is true about __init__() method?

Question 4: In order to make an instance variable private should be

Question 5: The commit() method should be executed to ____.

Question 6: Python DB-API is _______.

Question 7: A _____ cannot be a part of Python module

Question 8: What is self?

Question 9: Variable used inside a function become its ________.

Question 10: What kind of relationship exists between inherited class and base class?

Question 11: What is the difference between the range() and randrange() functions?

Question 12: Which of the following is TRUE about Python function?

Question 13: Which of the following is not a built-in exception in Python?

Question 14: In Python 'global' is a _______.

Question 15: Which of the following string is not a valid aces mode for opening a file in simultaneous read/write mode?

Question 16: In Python 'else' clause can be used along with which of the following keywords:

Question 17: REPL stands for:

Question 18: Which of the following statements is not true?

Question 19: Which of the following Python objects is not iterable?

Question 20: What is not true about bind() method in TKinter GUI Widget library?