R____
Subject Code:
ANURAG GROUP OF INSTITUTIONS
Autonomous
School of Engineering
II Year [Link]. CSE - I-Semester Regular Examinations, March - 2021
Subject: PYTHON PROGRAMMING
Time:3Hours Max Marks:75
---------------------------------------------------------------------------------------------------------------
Section – A (Short Answer type questions)
Answer all questions
(25Marks)
Unit-I
[Link] the Features of Python Language 2Marks
[Link] about different Logical operators in python with appropriate examples.3Marks
Unit-II
3. greet = 'Hello'
for letter in greet:
print(letter)
for above code predict output 2Marks
4. Explain Dictionary Comprehension with example program 3Marks
Unit-III
5. What is Class and instance variables 2Marks
[Link] about The self in class method 3Marks
Unit-IV
7. What is Meta class ? 2Marks
8. Write the advantages of operator overloading? 3Marks
Unit-V
[Link] is pack() in Tkinter module 2Marks
[Link] to create a destructor in Python? Give an example. 3Marks
Section—B (Essay questions)
Answer all questions, each question carries 10 marks and may contain two or more bits.
(5 x 10 =50 Marks)
Unit-I
1. a. What is the purpose of else clause for a loop? Explain how else
works with while and for loops, with example programs [10M]
OR
b. Compare fruitful and void functions. And also write a Python
function program that prints all factors of a given number[10M]
Unit-II
2. a. Discuss String built-in methods taking an example program
[10M]
OR
b. Differentiate between lists and tuples in Python? And also
validate the email id entered by user is valid or not using Python‘re’
module. [10M]
Unit-III
3. a Explain Built-in Functions to Check, Get, Set and Delete Class
Attributes with example program[10M]
OR
b. Explain creating classes in Python with example. and also explain
The __Init__Method , The _Del__Method[10M]
Unit-IV
14. a Explain the types of Inheritances supports in python using
example programs[10M]
OR
b. Write a Python program that overloads + operator, to add two
objects of a class. And also implement method overriding with example
program in Python? . [10M]
Unit-V 15.a Define exception? Explain how to handle the exceptions in python
with example? [10M]
OR
b Illustrate the following package in python with examples?
a) Numpy b) Pandas[10M]