0% found this document useful (0 votes)
4 views

Python Que

This document contains 103 questions related to Python programming. The questions cover a wide range of Python topics including data types, operators, functions, modules, OOP concepts, pandas, NumPy, debugging tools and more. The questions range from basic to more advanced concepts.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Python Que

This document contains 103 questions related to Python programming. The questions cover a wide range of Python topics including data types, operators, functions, modules, OOP concepts, pandas, NumPy, debugging tools and more. The questions range from basic to more advanced concepts.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

FAME WORLD EDUCATIONAL HUB

Python Questions

o 1.What is Python? What are the benefits of using Python


o 2.What is a dynamically typed language?
o 3.What is an Interpreted language?
o 4.What is PEP 8 and why is it important?
o 5.What is Scope in Python?
o 6.What are lists and tuples? What is the key difference between the two?
o 7.What are the common built-in data types in Python?
o 8.What is pass in Python?
o 9.What are modules and packages in Python?
o 10.What are global, protected and private attributes in Python?
o 11.What is the use of self in Python?
o 12.What is __init__?
o 13.What is break, continue and pass in Python?
o 14.What are unit tests in Python?
o 15.What is docstring in Python?
o 16.What is slicing in Python?
o 17.Explain how can you make a Python Script executable on Unix?
o 18.What is the difference between Python Arrays and lists?
o 19.How is memory managed in Python?
o 20.What are Python namespaces? Why are they used?
o 21.What is Scope Resolution in Python?
o 22.What are decorators in Python?
o 23.What are Dict and List comprehensions?
o 24.What is lambda in Python? Why is it used?
o 25.How do you copy an object in Python?
o 26.What is the difference between xrange and range in Python?
o 27.What is pickling and unpickling?
o 28.What are generators in Python?
o 29.What is PYTHONPATH in Python?
o 30.What is the use of help() and dir() functions?
o 31.What is the difference between .py and .pyc files?
o 32.How Python is interpreted?
o 33.How are arguments passed by value or by reference in python?
o 34.What are iterators in Python?
o 35.Explain how to delete a file in Python?
o 36.Explain split() and join() functions in Python?
o 37.What does *args and **kwargs mean?
o 38.What are negative indexes and why are they used?
o 39.How do you create a class in Python?
o 40.How does inheritance work in python? Explain it with an example.
o 41.How do you access parent members in the child class?
o 42.Are access specifiers used in python?
o 43.Is it possible to call parent class without its instance creation?
o 44.How is an empty class created in python?
o 45.Differentiate between new and override modifiers.
o 46.Why is finalize used?
o 47.What is init method in python?
o 48.How will you check if a class is a child of another class?
o 49.What do you know about pandas?
o 50.Define pandas dataframe.
o 51.How will you combine different pandas dataframes?
o 52.Can you create a series from the dictionary object in pandas?
o 53.How will you identify and deal with missing values in a dataframe?
o 54.What do you understand by reindexing in pandas?
o 55.How to add new column to pandas dataframe?
o 56.How will you delete indices, rows and columns from a dataframe?
o 57.Can you get items of series A that are not available in another series B?
o 58.How will you get the items that are not common to both the given series
A and B?
o 59.While importing data from different sources, can the pandas library
recognize dates?
o 60.What do you understand by NumPy?
o 61.How are NumPy arrays advantageous over python lists?
o 62.What are the steps to create 1D, 2D and 3D arrays?
o 63.You are given a numpy array and a new column as inputs. How will you
delete the second column and replace the column with a new column value?
o 64.How will you efficiently load data from a text file?
o 65.How will you read CSV data into an array in NumPy?
o 66.How will you sort the array based on the Nth column?
o 67.How will you find the nearest value in a given numpy array?
o 68.How will you reverse the numpy array using one line of code?
o 69.How will you find the shape of any given NumPy array?
o 70.Differentiate between a package and a module in python.
o 71.What are some of the most commonly used built-in modules in Python?
o 72.What are lambda functions?
o 73.How can you generate random numbers?
o 74.Can you easily check if all characters in the given string is alphanumeric?
o 75.What are the differences between pickling and unpickling?
o 76.Define GIL.
o 77.Define PYTHONPATH.
o 78.Define PIP.
o 79.Are there any tools for identifying bugs and performing static analysis in
python?
o 80.Differentiate between deep and shallow copies.
o 81.What is main function in python? How do you invoke it?
o 82.Write python function which takes a variable number of arguments.
o 83.WAP (Write a program) which takes a sequence of numbers and check if
all numbers are unique.
o 84.Write a program for counting the number of every character of a given
text file.
o 85.Write a program to check and return the pairs of a given array A whose
sum value is equal to a target value N.
o 86.Write a Program to add two integers >0 without using the plus operator.

87) Explain help() and dir() functions in Python.

88) How do you get a list of all the keys in a dictionary?


89) What is slicing?

90) How would you declare a comment in Python?

91) How will you check if all characters in a string are alphanumeric?

92) How will you capitalize the first letter of a string?

93) With Python, how do you find out which directory you are currently in?

94) How do you insert an object at a given index in Python?

95) And how do you reverse a list?


96) What is the Python interpreter prompt?

97) How does a function return values?

98) How would you define a block in Python?

99) Why do we need break and continue in Python?

100) Will the do-while loop work if you don’t end it with a semicolon?

101) In one line, show us how you’ll get the max alphabetical character from a string.

102) What is Python good for?

103) Can you name ten built-in functions in Python and explain each in brief?

You might also like