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

It - 21 Python Programming

The document contains 5 questions regarding Python programming. It covers topics like lists, modules, packages, generators, threads, exceptions, classes, inheritance, regular expressions, strings, files, databases, pandas and numpy.

Uploaded by

samarthnikam909
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

It - 21 Python Programming

The document contains 5 questions regarding Python programming. It covers topics like lists, modules, packages, generators, threads, exceptions, classes, inheritance, regular expressions, strings, files, databases, pandas and numpy.

Uploaded by

samarthnikam909
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Total No. of Questions : 5] SEAT No.

8
23
P5784 [Total No. of Pages : 2

ic-
[6120]-106

tat
First Year M.C.A. (Management)

5s
IT - 21 : PYTHON PROGRAMMING

6:5
02 71
(2020 Revised) (Semester - II)

3:4
1
31
Time : 2½ Hours] 7/1 013 [Max. Marks : 50
Instructions to the candidates:
2/2
.23 MP

1) All questions are compulsory.


2) Figures to the right indicate full marks.
3) Assume suitable data if necessary.
8.2 IM

80

8
23
ic-
Q1) a) Write a program to create a list of words from the given string which are
16

tat
less than size ‘A’ .

5s
Input String: “Python programming language has lot of applications in
.24

6:5
1
data analytics”.
49

3:4
17

Input n = 8 [5]
31
13

b) Explain the concept of modules and packages with suitable example.[5]


02
P0
2/2

OR
M
7/1

a) Explain generators with example. [5]


IM
80

8
b) Write a program to swap two numbers without using temporary variable

23
.23

accept input from the user. [5]


ic-
16

tat
8.2

5s

Q2) a) What is thread? Write a program that creates two threads. One thread
.24

6:5
71

should print even numbers from 2 to 8 and the other should print odd
49

3:4

numbers from 1 to 7. [5]


31
31

b) Write a program to accept an integer number and use try/except to catch


1
02
P0
2/2

the exception if a floating point number is entered. [5]


M
7/1

OR
IM
80

a) What is thread synchronization? Explain with suitable example. [5]


.23

b) Write a program that reads a text file and counts the number of lines and
16

words in the file. [5]


8.2
.24

P.T.O.
49
Q3) a) Write a program to validate strong password using regular expression -

8
23
specify rules for the strong password. [5]

ic-
b) Create a class “Bank” having attributes “Bank name” “Branch”, “City”,

tat
“Manager Name” and methods” “Change manager name” and “Display

5s
details.” Wirte a constructor to initialize the instance variables. Write a

6:5
02 71
main program to demonstrate the use of Bank class. [5]

3:4
1
OR

31
a)
7/1 013
Write a program to find the occurrence and position of the substrings
within a string consider user input. [5]
2/2
.23 MP

b) Write a program to demonstrate the overriding of the base class method


8.2 IM

in the derived class. [5]


80

8
23
ic-
16

tat
Q4) a) Write a program using mango DB database to create a “employee”.

5s
Collection having fields Emp ID, Name, Designation, Mobile, Department.
.24

6:5
Accept the input from the user to insert the documents. [5]
1
49

3:4
17

b) What is string slice? How it is useful. [5]


31
13

OR
02
P0

a) Explain deep copy with suitable example. [5]


2/2

b) Write a program using monogo DB database to create a collection “Chess


M
7/1

competition” with fields (Player_id, player_name, player_age,


IM
80

8
player_phone) and display all registrations. [5]

23
.23

ic-
16

tat
Q5) a) Create pandas dataframe using 2D list and perform following operations.
8.2

5s

[5]
.24

6:5

i) Display first 5 rows.


71
49

3:4

ii) Count missing values in column 2nd.


31
31

b) Create 3 × 3 numpy array and determine median and mode. [5]


1
02

OR
P0
2/2

a) Create dataframe using three series having size 10. series are account
M
7/1

number, name and balance. [5]


IM
80

b) Draw pie chart using matplot lib and decorate it by adding various elements
use suitable data. [5]
.23
16
8.2


.24

[6120]-106 2
49

You might also like