Python Learn Simpli September 6, 2019 no Comments 1. which of following answer is true about __init__() method? It is a constructor It is a magic method All of the above It calls __new__() method None 2. What does REPL stands for in Python? READ, EVALUATE, PRINT, LOOP NOne READ, EDIT, PRINT, LOOP RETRIEVE, EVALUATE, PRINT, LOOP None 3. What becomes the Variable used inside a function? None of these Reference variable Local variable Global variable None 4. What cannot be a part of Python module? Keyword none Function Class None 5. Value of __name__ attribute of a module may be equal to ‘main’ when it is imported by another script it is the first module in a package it is executed from interpreter None of these None 6. What is a Python DB-API ? Python module Specification for database connectivity modules Is used to access SQLite database None of these None 7. what should be a private in order to make an instance variable having double underscore before and after the name having single underscore before and after the name prefixed by single under score prefixed by double under score None 8. For what Commit() method should be executed? Refresh data after execution of query Close table Close database Finalize transactions None 9. Which is not iterable Objects in Python among following options ? String Dictionary Number None 10. Which is not a built-in exception in Python among following options? ImportError KeywordError ValueError TypeError None Time's up