Naresh It Interview Questions-1
Naresh It Interview Questions-1
If exception has raised with in the logic, an object will be created with the
complete information of error to be handled is called “Exception object”.
We can use try with finally block without except block definition but the
program terminates abnormally in case of exception.
What is Multitasking?
Yes, but the logic executes from the current thread space.
What is synchronization?
We can access private variables only within the class in which they have
defined.
We can access class level members such as variables and methods using
Identity of class.
Yes, but we can access only with in the class. We can define both class
level and object level methods as private.
By creating object for Child class, we can access Parent class functionality
using child object address.
The module is a Python source file with .py extensions. The module is
either a collection of functions(in procedure-oriented programming) or
collection of classes(in Object-oriented programming).
What is the need of the modularity program?
len() function is used to find the length of the string. It does not belong to
the string class.
Duplicate objects are not allowed in String pool area. If we try to create a
duplicate object, existing object address will be shared.
An ordered collection object that can able to store the duplicate elements
as well as heterogeneous elements.
The list is ordered whereas Set in un-ordered. List allows duplicates and
Set allow unique elements. List allow indexing and Set don’t allow.
Dictionary collection object store the element using keys. Keys must be
unique. If we try to store the elements using duplicate keys, existing
elements will be replaced.
pop() function either deletes the top(last) element of the List or deletes
the specified index element from the List.
clear() function is used to delete all the elements from collection. ‘del’
keyword is used to remove the collection object variable completely.
Yes allowed, we can use both indexing and negative indexing to access the
elements of the collection object.