0% found this document useful (0 votes)
32 views

be_first-year-fe-engineering_semester-1_2024_may_programming-and-problem-solving-pattern-2019

Uploaded by

chhayankvaidya11
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

be_first-year-fe-engineering_semester-1_2024_may_programming-and-problem-solving-pattern-2019

Uploaded by

chhayankvaidya11
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Total No. of Questions : 8] SEAT No.

8
23
PB3593 [Total No. of Pages : 3

ic-
[6260]-8

tat
F.E.

0s
PROGRAMMING AND PROBLEM SOLVING

3:5
(2019 Pattern) (Credit System) (Semester - I/II) (110005)

02 91
9:3
Time : 2½ Hours] [Max. Marks : 70

0
40
0/0 13
Instructions to the candidates:
1) Solve Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
0
2) Neat diagrams must be drawn weherver necessary.
5/2
.23 GP

3) Assume suitable data wherever necessary.


E

Q1) a) Write a short note on modules and package in python. [6]


83

8
C

23
b) Explain how we can pass command line arguments in python with a

ic-
suitable example. [6]
16

tat
8.2

c) Write a program to check whether a number is Armstrong number or not

0s
using a function. [5]
.24

3:5
91
49

OR
9:3
30
40

Q2) a) Write syntax of function definition and function call. Give a suitable
example for the same. [6]
01
02
5/2

b) Explain the following types of function arguments with examples. [6]


GP

i) variable length arguments


0/0
CE
83

ii) default arguments

8
23
.23

c) Write a program using lambda function to print a message ‘even’ if


number is even and ‘odd’ if number is odd. [5] ic-
16

tat
8.2

0s
.24

3:5

Q3) a) Explain the following string operations with examples. [6]


91
49

9:3

i) concatenation
30
40

ii) appending
01
02

iii) string multiplication


5/2
GP

b) Explain string formatting operator with suitable example. [6]


0/0
CE

c) Write a program that finds whether a given character is present in a string


83

or not. In case it is present it prints the index in which it is present. Do


.23

not use built-in find functions to search it. [5]


16

OR
8.2
.24

P.T.O.
49

[6260]-8 1
Q4) a) Explain string module in python. [6]

8
23
b) Explain following string methods with example. [6]

ic-
i) split()

tat
0s
ii) zfill()

3:5
iii) replace()

02 91
9:3
c) Write a program to reverse a string without using slicing operator. [5]

0
40
0/0 13
0
Q5) a) Explain the following programming Paradigms in detail.
5/2 [6]
.23 GP

i) Procedural
E

ii) Structured
83

8
C

23
iii) Object Oriented

ic-
16

b) Differentiate between class variable and object variable. [6]

tat
8.2

0s
c) Write a program to create a class ‘Book’ with members, title, author,
.24

3:5
publisher, and ISBN number. The functions of the class should read and
91
49

display the data. [6]


9:3
30
40

OR
01
02

Q6) a) Explain the following features of OOP [6]


5/2
GP

i) Classes and Objects


0/0

ii) Methods and Message Passing


CE
83

8
iii) Inheritance

23
.23

b) Explain class methods with suitable example.


ic-
[6]
16

tat
c) Write a program to calculate area of square and rectangle using a class.[6]
8.2

0s
.24

3:5
91
49

Q7) a) What is a file? Explain different Access Modes. [6]


9:3
30
40

b) Explain the following file handling methods. [6]


01
02

i) seek()
5/2
GP

ii) writelines()
0/0

iii) readline()
CE
83

c) Write a program that reads text from a file and writes in into another file
.23

but in the reverse order. (Hint: Make the first line in the original file as the
16

last line in the copied file). [6]


8.2

OR
.24
49

[6260]-8 2
Q8) a) Explain the following method with suitable example [6]

8
23
i) getcwd()

ic-
tat
ii) rmtree()

0s
3:5
iii) makedirs()

02 91
9:3
0
b) What is a file path? Explain absolute path and relative path. [6]

40
0/0 13
c) Explain the following dictionary methods. [6]
0
5/2
.23 GP

i) fromkeys()
E
83

8
C

23
ii) setdefault()

ic-
16

iii) update()

tat
8.2

0s
.24

3:5
91
49

9:3
30

  
40
01
02
5/2
GP
0/0
CE
83

8
23
.23

ic-
16

tat
8.2

0s
.24

3:5
91
49

9:3
30
40
01
02
5/2
GP
0/0
CE
83
.23
16
8.2
.24
49

[6260]-8 3

You might also like