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

Python QB

The document contains a series of questions and programming tasks related to Python, covering fundamental concepts such as classes, objects, file handling, data hiding, inheritance, exceptions, and modules. It also includes practical programming exercises, such as creating classes, using user-defined functions, and handling files. Additionally, it touches on libraries like NumPy and standard packages like Matplotlib and Pandas.

Uploaded by

akanksha914625
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Python QB

The document contains a series of questions and programming tasks related to Python, covering fundamental concepts such as classes, objects, file handling, data hiding, inheritance, exceptions, and modules. It also includes practical programming exercises, such as creating classes, using user-defined functions, and handling files. Additionally, it touches on libraries like NumPy and standard packages like Matplotlib and Pandas.

Uploaded by

akanksha914625
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Python

2 Marks

1. Define class and object in python.


2. List different modes of opening file in python.
3. With neat example explain default constructor concept in Python.
4. Describe mkdir( ) function.
5. Define Data Hiding concept ? Write two advantages of Data Hiding.
6. State the use of read ( ) and readline ( ) functions in python file handling
7. Write use of numpy package in python.
8. Write the syntax of fopen.
9. Define Module in Python.
10. Define Inhertinace And List Its types.
11. Define Package and List Built-in packages.
12. Give difference between method overloading and method overriding.
13. Define Single and Multilevel Inheritance
14. Define Exception.
15. How to Handle Exception In Python
16. Explain getwd() and remove() function of os package in python With Syntax.
17. Define Global and Local Variable.
18. Define Function and Userdefined Function.
19. How to import module and package in python
20. Write Output of Following:
import random
print(random.randint(0,5))

4 Marks
1. Write a program to create class EMPLOYEE with ID and NAME and display its contents
2. Explain how to use user defined function in python with example
3. Write a program for importing module for addition and substraction of two numbers
4. Write a program illustrating use of user defined package in python
5. Explain any four Python's Built-in Function with example.
6. With neat example differentiate between readline( ) and readlines( ) functions in file-handling.
7. Describe 'Self' Parameter with example.
8. Explain any four file modes in Python.
9. Write a program to show user defined exception in Python.
10. Explain Module and its use in Python.
11. Explain method overloading and overriding in python.
12. Explain Numpy package in detail.
13. Explain lambda function with syntax and example
14. WAP to read contents of first.txt file and write same content in second.txt file
15. Describe following Standard Packages i)matplotlib ii) Pandas
16. Write a python program to create a user defined module that will ask your program name and
display the name of the program
17. Write a program function that accepts a string and calculate the number of uppercase letters
and lower case letters.
18. Write a python program to create class student with roll-no and display its contents.
19. Explain following functions with example: i)open( ) ii)write( ) iii)close() iv) read()
20. Describe Exception in Python With Suitable Example.

You might also like