Professional Documents
Culture Documents
PPS Pyq 3
PPS Pyq 3
PPS Pyq 3
8
23
P-3664 [Total No. of Pages : 3
ic-
tat
[6001]-4008
2s
F.E. (Semester - II)
6:5
02 91
PROGRAMMING AND PROBLEM SOLVING
0:4
0
31
(2019 Pattern) (110005) 2/0 13
0
Time : 2½ Hours] [Max. Marks : 70
8/2
.23 GP
8
2) Solve Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6 and Q.7 or Q.8.
C
23
3) Neat diagrams must be wherever necessary.
ic-
4) Assume suitable data wherever necessary.
16
tat
8.2
2s
Q1) a) Explain in-built and user defined functions with syntax and suitable
.24
6:5
02 91
example. [6]
49
0:4
b) Explain the following terms with suitable examples. [6]
0
31
3
i) local variable
0 1
[5]
E
80
8
C
23
OR
.23
Q2) a) ic-
Explain the following types of function arguments with examples: [6]
16
tat
8.2
i) positional arguments
2s
.24
P.T.O.
.24
49
c) What is the output of the following statement for the given string? [5]
8
23
S = “Programming and Problem Solving”
ic-
i) print(S[:11])
tat
2s
ii) print(S[::-1])
6:5
iii) print("And" not in S)
02 91
0:4
iv) print(S[4])
0
31
v) print (S[0:10]) 2/0 13
0
OR
8/2
.23 GP
8
C
23
i) title()
ic-
16
tat
ii) startswith()
8.2
2s
iii) zfill()
.24
6:5
02 91
c) Write a program to display a string and count characters in the string
49
0:4
using a loop. [5]
0
31
1 3
0
8/2
i) Monolithic Programming
E
80
8
ii) Structured Programming
C
23
.23
tat
b) Explain the following concepts with example. [6]
8.2
2s
i) public members
.24
6:5
02 91
49
c) Write a python program to create a class Student with the attributes Name,
3
OR
.23 GP
2/0
b) Explain class method and class variable with suitable example. [6]
C
[6001]-4008 2
49
Q7) a) What is a file? Explain relative and absolute path of a file. [6]
8
23
b) Explain the following file handling methods. [6]
ic-
i) write()
tat
2s
ii) writelines()
6:5
ii) close()
02 91
0:4
c) Explain file access modes in brief. [6]
0
31
OR
2/0 13
0
8/2
Q8) a) Explain different directory methods with example. [6]
.23 GP
8
c) Explain the following dictionary methods. [6]
C
23
ic-
i) update()
16
tat
ii) keys()
8.2
2s
.24
6:5
iii) pop()
02 91
49
0:4
0
31
1 3
0
8/2
G P
2/0
E
80
8
C
23
.23
ic-
16
tat
8.2
2s
.24
6:5
02 91
49
0:4
0
31
1 3
0
8/2
.23 GP
2/0
E
80
.24
8.2
16
C
[6001]-4008 3
49