0% found this document useful (0 votes)
51 views2 pages

PYTHON-paper 1

The document is an examination paper for the T.Y.B.Sc. (Computer Science) course on Python Programming, consisting of five questions. It includes multiple-choice questions, programming tasks, and theoretical questions related to Python concepts such as functions, lists, and file handling. The exam is structured to assess students' understanding and application of Python programming within a two-hour timeframe.

Uploaded by

kathewadi47
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)
51 views2 pages

PYTHON-paper 1

The document is an examination paper for the T.Y.B.Sc. (Computer Science) course on Python Programming, consisting of five questions. It includes multiple-choice questions, programming tasks, and theoretical questions related to Python concepts such as functions, lists, and file handling. The exam is structured to assess students' understanding and application of Python programming within a two-hour timeframe.

Uploaded by

kathewadi47
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.

82
PD1577 [Total No. of Pages : 2

ic-
[6468]-57

t
sta
T.Y.B.Sc. (Computer Science)

5
1:1
CS-3510 : PYTHON PROGRAMMING

1
3:3
(Revised 2019 Pattern) (Semester -V)

4/2 21
51
Time : 2 Hours] [Max. Marks : 35
9/0 10
Instructions to the candidates:

02
1) All questions are compulsory.
0
9.8 AP

2) Figure to the fight indicate full marks.


49 CA

21

82
Q1) Attempt any Eight of the following (out of Ten) [8×1=8]

ic-
.21

tat
a) What is the purpose of range ( ) function?

5s
b) What is a list? Explain with suitable example.
2.1

1:1
11
20

c) What is copysing ( ) function? 3:3


02
51

d) How are tuples created?


02
01

e) What is a uniform ( ) method?


4/2
AP

f) How to create a package?


9/0
CA
21

g) What is a ‘wb’ mode in file?

-82
9.8

h) What is the use of finally block?


tic
.21

sta
i) Give the use of index ( ) method of string.
49

:15

j) Python is a scripting language comment.


2.1

:31
11
20

13
02

Q2) Attempt any four of the following (out of five) [4×2=8]


25
01
/20

a) Explain the filter function with example


9.8 AP
/04

b) Explain any two list methods with example


9
CA
21

c) Explain any two basic string methods.


d) Explain the concept of slicing with suitable example
.21

e) What are modules? Explain with example how to import modules.


49
2.1
20

P.T.O.
P.T.O.
Q3) Attempt any two of the following (out of Three) [2×4=8]

82
a) Which methods are used to read from file? Explain any two of them with

ic-
example.

t
sta
b) Write a python program to check if a given string as palindrome or not.

5
c) Write a program to find GCD of number using recursion.

1:1
1
3:3
4/2 21
Q4) Attempt any two of the following (out of Three) [2×4=8]

51
9/0 10
a) List the various methods of re package explain any two methods in detail

02
with example.
0
9.8 AP

b) Write a python program to find sum of digits of a number (Accept number


from user)
49 CA

21

82
c) Write a python program to append the contents of file 2 to file 1. Acept

ic-
file names from user
.21

tat
5s
Q5) Attempt any one of the following (one of two) [1×3=3]
2.1

1:1
a) What will be the output of the following code
11
20

3:3
r = lambda q : q*2
02
51

s= lambda q : q*3
02
01

x=2
4/2
AP

x = r(x)
9/0

x = s(x)
CA
21

x = r(x)

-82
9.8

print (x)
tic
.21

b) What will be the output of the following.


sta
49

code
:15
2.1

count = 1
:31
11
20

13

def do This ( ) :
02
25

global count
01
/20

for i in (1 , 2, 3)
9.8 AP
/04

Count + =1
9
CA
21

do This ( )
print (Count)
.21
49


2.1
20

[6468]-57 2

You might also like