Python Learn Simpli September 6, 2019 no Comments 1. Which string is not a valid aces mode for opening a file in simultaneous read/write mode in following options? w+ r+ rw wb+ None 2. What kind of relationship exists between inherited class and base class? HAS A Both IS A None None 3. What is meant by self in Python? It is reference to object which calls an instance method. It is a keyword. It is a built-in function in python It is a class attribute. None 4. which of following answer is true about __init__() method? It is a magic method It is a constructor It calls __new__() method All of the above None 5. what should be a private in order to make an instance variable prefixed by double under score having double underscore before and after the name prefixed by single under score having single underscore before and after the name None 6. Value of __name__ attribute of a module may be equal to ‘main’ when it is imported by another script it is executed from interpreter None of these it is the first module in a package None 7. Difference between range() and randrange() functions? Option A is correct randrange() selects one number from the range randomly range() generates a sequence of numbers, Both None 8. Which statements is not true in the following options? Indent length may vary for each block Statements in a block must have same indent level. None Each block must have same indent level. None 9. Which is an incorrect syntax in the following answers? import module from module import function import function from module None 10. What does REPL stands for in Python? READ, EVALUATE, PRINT, LOOP NOne RETRIEVE, EVALUATE, PRINT, LOOP READ, EDIT, PRINT, LOOP None Time's up