Python Q.Pr

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

First Semester M.Sc.

Degree Preparatory Examination March 2024

(CBCS Scheme)

Paper CPT 1.3 – Python Programming

Time: 3 Hours Max. Marks : 70

Instructions to Candidates: Answer all the Mains.

I. Answer any Ten Questions of the following

1. Answer in Brief (10 X 2 = 20)

(a) Define String.

(b) Define Function.

(c) Define Nested If Statement.

(d) Define Classes and Methods.

(e) Define List.

(f) Define List Methods.

(g) Define File.

(h) Define Dictionary.

(i) Define Set.

(j) Define Class and Object.

(k) Write on GUI.

(l) Write on Widgets.

II. Write Short notes on the following (Answer any FOUR) (4 x5 =20)

2. Explain how the following are used in String

(a) Multiline string 2

(b) Quotes 3
3. (a) Explain different forms of importing modules. 2

(b) Discuss the significance of doc strings. 3

4. Explain the following methods of list:

(i) append( ) (ii) extend( ) (iii) insert( ) (iv) reverse( ) (v) count( )

5. Compare the storage collection types strings, lists, tuple, sets and dictionaries.

6. List out and explain the phases involved in Object-Oriented programming.

III. Answer any three questions of the following

7. Essay type questions (Answer any THREE) (3 x 10 = 30)

(a) (i) Explain inbuilt functions of string in python with examples. 5

(ii) Explain and construct the memory model of variables in python. 5

(b) (i) Discuss the importance of doc string in testing the code semi- automatic. 6

(ii) Write a Python program to find roots of quadratic equation. 4

(c) (i) Explain in operator and range function with examples. 5

(ii) Explain any 5 methods of list with examples. 5

(d) (i) Demonstrate any four methods of Dictionary. 4

(ii) Explain the operations performed on sets with examples. 3

(iii) Write a Python event driven program for file operations. 3

(a) Open file in read mode.

(b) Open file in write mode.

(c) Current position of file pointer.

(e) Explain any 10 GUI widgets with respect to tkinter. 10

You might also like