Python reference Interview questions

1)HCL Python scripting developer Interview questions:-
1) How do you check list of files in the given path in python ??
2) How do you check whether file is exist or not in python
3) How do you perform copy file cmd in python ??
4) What is d use of setup.py in python
5) What is d use of __init__=__main__: condition in python??
6) What is d type of *args and **kargs ??
7) sys.path use in python ??

 2) CES Limited Python developer Interview Face2Face Interview questions:-

1.Basic questions on oops:
  *.Implement Base class using Instance, static and Abstract method
    instance method - takes two arguments to add operation
    static method - takes two args to multiply operation
    abstract method - takes two args to div operation
  *. Implement child class using 3 instance methods
    instance - takes three args for add operation
    instance - takes two args for multiplicatio operation
    instance - takes two args for div opration
    create a relation between two classes
2. How you realate two objects in python? For example Book and Page.
3. find the sum of sequence by skipping the between elements without using slicing.
    Ex seq = [1, 2, 3, 4, 5, 6, 7, 8, 9] where x = 4, y = 7
       skip elements between x and y(including x and y i,e. [4, 5, 6, 7]) always y
       comes after x
       output: 1+2+3+8+9 = 23
4. File question:
   File has following data:
   Print the words of the file by sorting order of the corresponding integers.
   Expected output:
    ABC, IJK, PQR, TUV, DEF
   =======
   TUV
   7
   PQR
   4
   ABC
   1
   DEF
   8
   IJK
   3
   =========
5. What is decorator? use of decorator? How you implement the decrator for argumented functions to override the behaviour.
6. Difference between __new__ and __init__ ??

 3)One of the Leading Bank company Telophonic Interview questions for Python developer:-  My friend doesnt want to reveal company name.

1) What is d diffrence between python and other laungages ??
2) Comprehension vs generators expression ??
3) What is d use of yield keyword in python ??
4) What is d use of "with file open "?? How do you implement ur own context manager ??
5) Abstract class in python ??
6) Java type constructor in python ??
7) list vs tuple vs dictinary vs set
8) Metaclasses in python
9) How do you connect with Oracle dtabase from the python
10) Which Test framework are you familar ?? (example pytest framework..)

4)Microsoft written Interview questions for Python Developer:-

1) Addition of two binary strings a ="11" and b = "1" and output "100"
2) Permutation of ABC
3) Input string "aaabccdee" then output "3ab2cd2e"
4) Validstings
      {}
      ({})
      [{()}]
      and invalid string
       (}
       {{)}
       [{[{()})]

No comments:

Post a Comment