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

Unit Test II Question Bank

1. Define function in Python

2.Write the syntax of fopen?

3.Use of any four methods in math module

4.List built in class attributes

5.Use of NumPy

6.Explain use of namespace in python

7.Describe module in Python with its advantages?

8.Explain different modes of opening a file

9.Design a python program which will throw exception if the value entered by user is less than
zero

10 Write a Python program to concatenate two strings

11.State the use of global with simple example.

12.Define class. How to create a class and its object in Python?

13.State the use of parameter “self” in Python class.

14.List out four modes in file handling in Python.

15.State the use of read( ) and readline( ) function in Python file handling mechanism.

16.Describe user defined function in Python

17.Explain the following package with suitable example.

a.NumPy b.SciPy c.Pandas d.Matplotlib

18.Create a class student with data members: name, department and roll_no. Create suitable
methods for reading and printing student information.

19.Explain inheritance in Python with example.

20.Write a Python program which will throw exception if the value entered by user is less than
zero.

21.Define a function in Python and give example.

22.Explain open() method and write syntax.


23.Explain the Math Module in Python and give four methods

24.Explain use of self parameter in Python with example.

25.What is the use of NumPy and Matplotlib packages in Python?

26.Explain different modes of opening a file in Python.

27.Describe the module in Python with an example also give the advantages.

28.Explain method overriding with an example

29.Explain the namespace and scope of variable in Python.

30.Explain try-except block/statement in Python with an example

You might also like