MSBTE CAMPUS ACADEMY
22616
23242
3 Hours / 70 Marks Seat No.
Instructions – (1) All Questions are Compulsory.
(2) Answer each next main Question on a new page.
(3) Illustrate your answers with neat sketches wherever
necessary.
(4) Figures to the right indicate full marks.
(5) Assume suitable data, if necessary.
(6) Use of Non-programmable Electronic Pocket
Calculator is permissible.
(7) Mobile Phone, Pager and any other Electronic
Communication devices are not permissible in
Examination Hall.
Marks
1.
Attempt any FIVE of the following: 10
a) Enlist any four data structures used in python.
b) Give membership operators in python.
c) Write syntax for a method to sort a list.
d) Write use of matplotlib package in python.
e) What is data obstruction and data hiding.
f) Write the syntax of fopen.
g) What is dictionary?
MSBTE CAMPUS ACADEMY
P.T.O.
22616 [2]
Marks
2.
Attempt any THREE of the following: 12
a) Explain with example:
i) Indentation
ii) Variables
b) Print the following pattern using loop:
1 0 1 0 1 0 1
1 0 1 0 1
1 0 1
1
c) Write python program to perform following operations on set.
i) Create set of five elements
ii) Access set elements
iii) Update set by adding one element
iv) Remove one element from set.
d) Describe following Standard Packages
i) Numpy
ii) Pandas
3.
Attempt any THREE of the following: 12
a) What is the output of the following program?
dict1 = {‘Google’ : 1, ‘Facebook’ : 2, ‘Microsoft’ : 3}
dict2 = {‘GFG’ : 1, ‘Microsoft’ : 2, ‘Youtube’ : 3}
dict1⋅update(dict2);
for key, values in dictl⋅items( ):
print (key, values)
b) Write a python program that takes a number and checks
whether it is a palindrome.
c) Write a python program to create a user defined module that
will ask your program name and display the name of the
program.
d) List data types used in python. Explain any two with
example.
MSBTE CAMPUS ACADEMY
22616 [3]
Marks
4.
Attempt any THREE of the following: 12
a) Compare list and tuple (any four points).
b) Write a python program takes in a number and find the sum
of digits in a number.
c) Write a program function that accepts a string and calculate
the number of uppercase letters and lower case letters.
d) Write a python program to create class student with roll-no
and display its contents.
e) Explain following functions with example:
i) The open( ) function
ii) The write( ) function
5.
Attempt any TWO of the following: 12
a) Write the output for the following if the variable course =
“Python”
>>> course [ : 3 ]
>>> course [ 3 : ]
>>> course [ 2 : 2 ]
>>> course [ : ]
>>> course [ -1 ]
>>> course [ 1 ]
b) Write a python program to generate five random integers
between 10 and 50 using numpy library.
c) Write a Python program to create a class ‘Diploma’ having
a method ‘getdiploma’ that prints “I got a diploma”. It
has two subclasses namely ‘CO’ and ‘IF’ each having a
method with the same name that prints “I am with CO
diploma” and ‘I am with IF diploma’ respectively. Call
the method by creating an object of each of the three
classes.
MSBTE CAMPUS ACADEMY
P.T.O.
22616 [4]
Marks
6.
Attempt any TWO of the following: 12
a) Explain multiple inheritance and write a python program to
implement it.
b) Write a Python program to create user defined exception that
will check whether the password is correct or not.
c) Describe various modes of file object. Explain any three in
detail.