Fill in the blanks 1) If we write print(10 in [10, 20, 30]), it will evaluate this to . (True / False / Error) 2) We use keyword to update global variable inside user defined function of python. 3) is a type of checking where user is aware about the internal structure of the program. 4) In Python exception handling, is the block which executes in all the situations whether exception occurs or not. 5) search needs sorted elements in order to search. 6) If x = “Python”, then print(x[::-1]) will print . 7) sort is based on divide and conquer concept.
[7 marks]True / False 1) We can specify “else” block for python loops. 2) Specification are specified using # sign in Python. 3) “raise” keyword can be use to fire user defined exception. 4) Hashtables are predefined. You can’t create Hashtables in Python. 5) The mode which is used to open file for reading and writing is “r+w+” in Python. 6) We can’t pass function name as parameter in Python. 7) In Python, the variable which is shared amongst all the objects of a class is known as Class Variable.
[7 marks]Explain the difference between Mutable and Immutable objects.
[7 marks]Explain strings in python. Explain the concept of slicing of strings
[7 marks]Briefly explain different types of “if” blocks that can be written in Python.
[7 marks]Differentiate between White Box Testing and Black Box Testing
[7 marks]Explain List and related methods of list
[7 marks]Differentiate between Overt and Covert Bug as well as Persistent Bug and Intermittent Bug
[7 marks]Explain the difference between instance method, class method and static method in Python.
[7 marks]Write a program to read any file and display no. of characters, digits and special symbols in that file.
[7 marks]What do you mean by Exception Handling ? Explain all blocks which can be used for exception handling. OR1
[7 marks]Write a program to read 10 names. Store them in a file as well as display sorted names.
[7 marks]Explain merge sort in python.
[7 marks]What is 0/1 Knapsack Algorithm ? Explain with example.
[7 marks]Explain following methods of “pylab” - plot() - xlabel() - savefig() - title() - xlim()
[7 marks]What do you mean by Hash Table ? Explain the concept with some example.
[7 marks]Briefly explain how inheritance can be done in different ways using Python.
[7 marks]