Python Programming

 SAMPLE QUESTIONS SET OF PYTHON PROGRAMMING..


                                                                                                                                    SEAT No


[58231-507

T.Y, B.Sc.

COMPUTER SCIENCE

CS-3510 0 Python Programming

19 Pattern) (CBCS) (Semester - V) (2019 10/08)


Time: 2 Hours]                                                                                                                Max. Marks: 35

Instructions to the candidates:

1) All questions are compulsory.

2) Figures to the right indicate full marks. 

3) Total number of questions are five.


Q1) Attempt any 8 of the following: [8 × 1 = 8]

a) What is dry run in Python?

b) Give the purpose of selection statements in Python.

 c) List the types of type conversion in Python.

d) What is the use of pass statement?

e) Explain the function enumerate().

1) Explain the extend method of list.

g) What are required arguments in function?

h) Explain any 2 functions in time module.

i) What are the types of file in Python?

j) Write the use of seek & tell function.


Q2) Attempt any 4 of the following: [4x2=8]

a) How to handle exception in Python?

b) Explain any 2 metacharacters used in regular expression.

c) Explain any 2 built-in list functions.

d) Explain backward indexing in strings.

e) Define identifiers.


03) Attempt any 2 of the following: [2x4-8]

a) Write a Python program to check if a given number is Armstrong

b) Write a Python program to display power of 2 using anonymous function.

c) Write a Python program, to print even length words in a string. 


04) Attempt any 2 of the following: [2x4=8]

a) Write a Python program to check for Zero Division Error Exception.

b) Write Python program to find ged of a number using recursion. 

c) Write Python program to check if a given key already exists in a dictionary


Q5) Attempt any 1 of the following: [1x3=3]

a) Trace the output of the following 

sum=0

for i in range (12, 2,-2):

sum += i

print sum

b) Trace the output of the following:

count = 1 

def do This (): 

global count 

for i in (1, 2, 3):

   count += 1

do This()

Thanks.....



Post a Comment

0 Comments