Oop Using Python
Oop Using Python
Page 1 of 1
SIKKIM MANIIPAL UNIVERSITY
EXAMINATION
IISEMESTER B.TECIH(AI& DS) DEGREE
USING PYTIION
OBJECT ORIENTED PROG.
AD 1303 |CGPA-(21) (3CR)]
Max nrks: 100
Duration: 3hrs
13 JAN 2023
Note: Answer all questions. suitably.
Any missing or misprinteddata may beassumed
Description Marks
Q.No Sub allotted
Q.No. using
1 (a) Write a pythonprogram for swapping of two numbers with and without |71
temporary variable.
Write apython program to Iind the given year is leap or not. [5]
(b) Explain the break and continuc statement with the help of "for loop" witlh an [5]
(c)
example.
Differentiate global and local variables. |3|
(d)
List different types of inheritance and explain cach onc with suitable examples.
2 (a) Write a program 1o demonstrate parameterizedconstructor in the basc class
(b)
and derived class.
(c) Define class? How to create a class and its object in python. |I44]
(d) Describe user-defined function in pytlhon. |3]
3 (a) Demonstrate about the GUI programming in python with proper program 17]
example.
(b) What is the predefined function uscd to find length of a string? Illustrate with [2+3|
a suitable program.
(c) Differentiate between method overloading and method overriding.
(d) What do you understand by errors and exception? [3]
4 (a) Express multilevel inheritance with an example. [7]
(b) Write a program to read .txt file using for loop". [5]
(c) Differentiate between file modes rt and wt with respect to python. [5]
(d) What is recursive function? (31
(a) Creat a program to execute thrcad synchronization mechanism in python.
(b) Execute a python GUI program to create two buttons: exit and hello using
tkinter module.
(c) Write five benefits of multithreading in python. [S]
(d) Write a short note on PyPI. [3]
1/1
SIKKIM MANIPAL UNIVERSITY
SEMESTER B.TECH(AL& DSs) DEGREE EXAMINATION
OBJECT ORIENTED PROG. USING PYT'ION
Duration: 3hrs AD 1303 |CGPA -(21) (3CR)]
Max marks: 100
Note: Answer all
Any missing or questions.
misprinted data may be assumed suitably.
Q.No Sub
Q.No. Description Marks
(a) allotted
What are the major features and
1o find applications
(b) Create recursive function of python?
(c) factorial of a number.
Develop a single program to show publicprivate
(d) What is protected access modilier.
2
Indentation? Explain with example. |1+2|
(a)
(b)
Explain inheritance in python with
(c)
Write about class constructor ( init example.
0)and
17]
(d) Differentiate betwcen method overloading sclf-variable.
and method overriding.
Describe polymorphism.
3 |3]
(a) List out different string
three. operations. Writc an example program ior any |l+6]
(b) Make a comparison between
default constructor and
(c)
constructor. paramctcrised
Explain thread life cycle using propcr
(d) What is root window? diagram. [5]
4 |3]
(a) Create a user defined exception with an
(b) Create a python program to read a given example
CSV file
program.
(c) Develop a python program to read first 'n' lines ofasa afile.list.
(d) Why Exception Handling is required?
5 [3]
(a) Construct a program to execute thread synchronization mechanism in
python.
(b) Write a python GUI program to add a
tkinter module. button in your application using
(c) Write a python program to create a table and
table. insert some records in that [5]
(d) Write a short note on python package index
(PyPI). [3]
Fage 1 of 1