Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

PYTHON IMP Question Bank By MCA SCHOLARS GROUP

Questions for 10 marks:-


Q.1) What is Dictionaries? Explain following functions with example.
i) len( )
) cmp( )
iii) update( )
iv) get( )

Q.2) Discuss inheritance in Python programming language. Write a Python program to demonstrate
the use of super() function.

Q.3) Write Python code to find all indices of a substring in the given string.
Q.4) Write python code to demonstrate/perform basic CRUD operations with MongoDB and python.

Q.5) a)What is file? Explain different modes in which file can be open.
b)Write Python code to create a text file and perform read and write operations on it.
Q.6) What is lists? Explain insert, append, extend, remove functions related to list along with example.

Q.7) Write python code to convert the last character of each word in the string touppercase

Q.8) How will you add an index, row or column to a pandas DataFrame? Explain with example.

Q9) a)What is file? Explain different modes in which the file can be opened.
b)Write python code to create a file; and perform read and write operationon it.

Q.10) What is Inheritance? Explain multiple inheritance and multilevel inheritancewith example.
Q.11) What is Numpy array? How to create NumPy array. Explain with example.

Q.12)How to Delete Indices, Rows or Columns From a Pandas Data Frame?


Q.13) Define the different ways a dataframe can be created in Pandas with example.

Q.14)What is NoSQL database? Compare SQL Vs NoSQL .

Q.6) Ouestion for 5 marks


a)Explain the concept of user defined exceptions with suitable example.
b)How will u create a series from dictionary in Pandas.
c)Discuss the following methods supported by compiled regular
expression objects.
a) search() b) match() c) findall()
d)Write a python code to print fibonacci sequence upto first 'n' terms.

e)Write a program to find the sum of all Odd and Even numbers up to
a number specified by the user
f)Write a Python function to check if the input year is leap year or not

g)What is multithreading? Explain with example.


h)Explain concept of Modules with example.

i)Write Python code to check if the input number is palindrome or not

j)Write Python code to multiply two matrices.

k)Write a user defined python function to check whether the given numberis prime or not?
l) Write a python code to create dictionary perform add, remove, popand
update operations on it.

Q7) Write short note on following (any three):

a) The dir( ) function


b) Features of python
c) Scope of variables
d) Tuples

You might also like