May Jun 2023
May Jun 2023
May Jun 2023
8
23
P-3664 [Total No. of Pages : 3
ic-
tat
[6001]-4008
2s
F.E. (Semester - II)
6:5
02 91
0:4
PROGRAMMING AND PROBLEM SOLVING
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-
16
tat
8.2
2s
.24
Q1) a) Explain in-built and user defined functions with syntax and suitable
6:5
91
example. [6]
49
0:4
30
i) local variable
01
02
8/2
[5]
80
8
23
OR
.23
Q2) a) Explain the following types of function arguments with examples: [6] ic-
16
tat
8.2
i) positional arguments
2s
.24
6:5
0:4
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) 2/0 13
print (S[0:10])
0
8/2
OR
.23 GP
8
b) Explain following string methods with example. [6]
C
23
ic-
i) title()
16
tat
ii) startswith()
8.2
2s
iii) zfill()
.24
6:5
91
49
i) Monolithic Programming
CE
80
8
ii) Structured Programming
23
.23
ic-
iii) Object Oriented Programming
16
tat
b) Explain the following concepts with example. [6]
8.2
2s
.24
i) public members
6:5
91
49
0:4
c) Write a python program to create a class Student with the attributes Name,
01
02
OR
2/0
b) Explain class method and class variable with suitable example. [6]
.23
[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
02 91
ii) close()
0:4
0
c) Explain file access modes in brief. [6]
31
2/0 13 OR
0
8/2
Q8) a) Explain different directory methods with example. [6]
.23 GP
8
C
23
ic-
i) update()
16
tat
8.2
ii) keys()
2s
.24
6:5
iii) pop()
91
49
0:4
30
31
01
02
8/2
GP
2/0
CE
80
8
23
.23
ic-
16
tat
8.2
2s
.24
6:5
91
49
0:4
30
31
01
02
8/2
GP
2/0
CE
80
.23
16
8.2
.24
[6001]-4008 3
49