Code No: G-9124/BL
FACULTY OF SCIENCE
[Link]. (CBCS) II - Semester Examination, April / May 2025
Subject : Artificial Intelligence and Machine Learning
Paper – II : Object Oriented Programming using Python
Time: 3 Hours Max. Marks: 80
PART - A
Note: Answer any eight questions. (8x4 = 32 Marks)
1. What are the types of comments in python?
2. Explain break statement with flow chart and example.
3. What is *args and **kwargs parameters.
4. Explain string slicing with an example.
5. What is python dictionary? How to create dictionary?
6. Explain zip function with example.
3
7. Discuss various file operations.
1
8. What is OS module? Explain.
1
9. What is regular expression? Explain with example.
10. What is a class in python? Explain.
1
11. Differentiate class attributes and data attributes.
12. What is encapsulation? Explain with an example.
-
U
PART - B
Note: Answer all questions. (4x12 = 48 Marks)
O
13. a) i) Explain different Data Types in Python.
ii) Describe Type Conversions in python with examples.
(OR)
3
b) Explain the following with syntax, example and program :
1
i) While loop ii) For loop
1
14. a) Describe various built-in list functions in python with suitable examples.
1
(OR)
b) i) Describe the Relations between Tuples and Dictionaries.
-
ii) Discuss the Built-in Functions used in Dictionaries and also different dictionary
Methods with suitable examples.
U
15. a) What is pickle module? Write its features, advantages and disadvantages.
O
(OR)
b) What is a regular expression? Explain commonly used methods in regular expressions
with examples.
16. a) Demonstrate different types of constructors with examples.
(OR)
b) What is Polymorphism? Explain with examples.
******