LinkedIn Insight BSc.-Programming with Python-II-Mumbai-April 2018 - Grad Plus

BSc.-Programming with Python-II-Mumbai-April 2018

MUMBAI UNIVERSITY

Subject: Programming with Python

Semester: 2

[Total Time: 2¼Hours]
[Total Marks: 75]
N.B. 1) All questions are compulsory.
       2) Figures to the right indicate marks.
       3) Illustrations, in-depth answers, and diagrams will be appreciated.
       4) Mixing of sub-questions is not allowed.
__________________________________________________________________________________________________________________________________________________

Q.1 Attempt All (Each of 5Marks) (15M)

A Multiple Choice Questions.

1) The _method is used to determine current position within file.
a) seek()                 b) tell()               c)pos()                d)cur_pos()

2 ____________ method is used to create our own iterator.
a) _iter_()                b) __next_()         c)_create_iter()   d) a and b.

3) ________ is a base class for all the numerical calculation.
a) ArithmeticError             
b) Zero Divisionerror)
c) OverflowError()             
d) StandardError()

4 ____________ is a powerful tool in text processing toolbox.
a) TextTool                         b) Toolbox
c) Regular expression        d) Text Editor

5) __________ are the endpoints of bidirectional communication channel.
a) server                b) client              c) network           
d) sockets

 

B) Fill in the blanks (remove, $ and (), simple mail transfer protocol, wb+, ab+, del, * and ?, socket, URL)

1) ___________ mode is used to open file for botly read and write operation.

2) The ______________ method is used to delete file.

3) Regular expression uses______and _________  wildcard characters.

4) ____________ is a protocol which handles sending e-mail.

5) ____________ is a software abstraction of a physical space through which a client and a server can send messages.

 

C) Short Answers

1) What are the attributes of file object?

2) What is the use of pack method?

3) What is a modifier in a regular expression?

4) What is the use of compilation flag?

5) Explain search() method.

 

Q. 2)   Attempt the following (Any THREE)(Each of 5Marks) (15M)

a) Explain various types of file modes.

b) Explain iterators and their problem solving applications.

c) What is an exception? What are the various keywords to handle exceptions?

d) What are the various types of regular expressions and explain it.

e) Write a source code in python to count frequency of words in a file.

f) Write a source code in python to demonstrate match function.

 

Q. 3) Attempt the following (Any THREE) (Ench of 5Marks) (15M)

a) What is GUI? What are the advantages of GUI?

b) Write a short note on GUI library

c) What is the use of listbox widget? Give an example to add elements to list box.

d) Write a note on Canvas widget.

e) Write a source code in python to create a login screen.

f) Write a source code in python to draw an oval filled with red color.

 

Q. 4) Attempt the following (Any THREE) (Each or 5 Marks) (15M)

a) How will you install mysql connector in pythons?

b) How to execute different types of statements. Explain with an example.

c) What is transaction? How will you execute transactions in python?

d) What is exception? Explain any 4 database exceptions.

e) Write a source code in python to read single and multiple results of query execution.

f) Write a source code in python where server sends current time string to the client.

 

Q. 5) Attempt the following (Any THREE) (Euch of 5 Marks) (15M)

a) Explain directory methods in python.

b) Explain bind method with an example.

c) Write a source code in python to send email and read contents of URL.

d) Explain regular expression with example,

e) Explain message widget with an example.

__________________________________________________________________________________________________________________________________________________

Scroll to Top