0% found this document useful (0 votes)
318 views17 pages

Pps End Sem Question Paper

Uploaded by

sadanandgurav100
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)
318 views17 pages

Pps End Sem Question Paper

Uploaded by

sadanandgurav100
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/ 17

Total No. of Questions : 8] SEAT No.

8
23
P-9073 [Total No. Of Pages : 3

ic-
tat
[6178] - 8

4s
F.E.

5:3
02 91
Programming and Problem Solving

3:3
0
41
(2019 Pattern) (Semester - I) (110005)
0/0 13
Time :2½ Hours] [Max. Marks : 70
0
1/2
.23 GP

Instructions: 1) Solve Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7 or Q8.


2) Figures to the right indicate full marks.
E
81

3) Neat Diagrams must be wherever necessary.

8
C

23
4) Assume suitable data wherever necessary.

ic-
16

tat
Q1) a) Define a function with suitable example? Explain need for a function. [6]
8.2

4s
b) Differentiate between local and global variables. [6]
.24

5:3
91
c) Write a program using function to find square of a number. [5]
49

3:3
30

OR
41

Q2) a) Explain the following types of function arguments with examples: [6]
01
02

i) default arguments ii) keyword arguments


1/2
GP

b) Explain user defined module and package in Python. [6]


0/0

c) Write a program to perform addition of two numbers using lambda


CE
81

8
function. [5]

23
.23

ic-
Q3) a) Explain string indexing and slicing with suitable example. [6]
16

tat
b) Explain the following with suitable example. [6]
8.2

4s

i) ord() and chr() function ii) in and not in operators on string


.24

5:3

c) What is the output of the following statement for the given string?
91
49

3:3

st = “Python is an interpreted programming language” [5]


30
41

i) print (st [12:20])


01
02

ii) print (st [:: – 1])


1/2
GP
0/0

iii) print ("an" not in st)


CE
81

iv) print (st [17])


.23

v) print (st [0:23])


16
8.2

P.T.O.
.24
49
8
OR

23
ic-
Q4) a) Explain string format method with suitable example. [6]

tat
4s
b) Explain following string methods with example. [6]

5:3
i) title()

02 91
3:3
0
ii) capitalize()

41
0/0 13
iii) lower()
0
1/2
.23 GP

c) Write a program to display a string and count characters in the string


using a loop. [5]
E
81

8
C

23
Q5) a) What is programming paradigm? Explain the following Programming

ic-
Paradigms in detail [6]
16

tat
8.2

4s
i) Monolithic Programming
.24

5:3
91
ii) Procedural Programming
49

3:3
30

b) Explain the following concepts with example. [6]


41
01
02

i) Object variable
1/2
GP

ii) class variable


0/0
CE
81

8
c) Write a python program to create a class Employee with the attributes

23
.23

Name, emp_id, and salary and display data of 2 employees. [6]


ic-
16

tat
OR
8.2

4s
.24

Q6) a) Explain the following features [6]


5:3
91
49

3:3

i) Class
30
41

ii) Inheritance
01
02
1/2

iii) Polymorphism
GP
0/0

b) Explain class method and self-object with suitable example. [6]


CE
81

c) Write a program to create class Car with two attributes name and cost.
.23

Create 3 objects and display information. [6]


16
8.2
.24

[6178]-8 2
49
Q7) a) What is a file? Explain relative and absolute path of a file. [6]

8
23
ic-
b) Explain the following file handling methods. [6]

tat
4s
i) write()

5:3
02 91
ii) tell()

3:3
0
41
iii) seek()
0/0 13
0
c) Explain the following file access modes
1/2 [6]
.23 GP

i) r ii) w iii) a iv) rb v) wb vi) r+


E
81

8
C

23
OR

ic-
16

Q8) a) Explain any 3 directory methods with example. [6]

tat
8.2

4s
.24

5:3
b) Explain text and binary files with example. [6]
91
49

3:3
30
41

c) Explain any 3 dictionary methods with example. [6]


01
02
1/2
GP
0/0
CE
81

8
23
.23

  
ic-
16

tat
8.2

4s
.24

5:3
91
49

3:3
30
41
01
02
1/2
GP
0/0
CE
81
.23
16
8.2
.24

[6178]-8 3
49
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
Total No. of Questions : 8] SEAT No. :

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

Instructions to the candidates :


1) Question one is compulsory.
E
80

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

4) Assume suitable data wherever necessary.

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

b) Explain the following terms with suitable examples. [6]


31

i) local variable
01
02
8/2

ii) global variable


GP
2/0

c) Write a program to check whether a number is prime or not using function.


CE

[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

ii) variable length arguments


91
49

0:4

b) Explain different ways of importing an in-built module in python with


30

suitable example. [6]


31
01

c) Write a program to find cube of a number using lambda function. [5]


02
8/2
GP
2/0

Q3) a) Justify strings are immutable with example. [6]


CE
80

b) Explain the following with suitable example. [6]


.23

i) ord() and chr() function


16

ii) in and not in operators on string


8.2

P.T.O.
.24
49

Other PYQs => www.studymedia.in/fe/pyqs


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

Q4) a) Explain string format operator with suitable example. [6]


E
80

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

c) Write a program to display a string and count characters in the string


0:4
30

using a loop. [5]


31
01
02
8/2

Q5) a) Explain the following Programming Paradigms in detail. [6]


GP
2/0

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

ii) private members


30
31

c) Write a python program to create a class Student with the attributes Name,
01
02

roll no and age and display data of 4 students. [6]


8/2
GP

OR
2/0

Q6) a) Explain any three object oriented features in brief. [6]


CE
80

b) Explain class method and class variable with suitable example. [6]
.23

c) Write a program to calculate area of triangle using a class. [6]


16
8.2
.24

[6001]-4008 2
49

Other PYQs => www.studymedia.in/fe/pyqs


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

b) Differentiate between text and binary files. [6]


E
80

8
C

c) Explain the following dictionary methods. [6]

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

Other PYQs => www.studymedia.in/fe/pyqs


For more Subjects

https://www.studymedia.in/fe/notes
Total No. of Questions : 9] SEAT No. :
PA-4300 [Total No. of Pages : 3
[5924]-9
F.E.
PROGRAMMING AND PROBLEM SOLVING
( 2019 Pattern) (Semester-II) (110005)

Time : 2½ Hours] [Max. Marks : 70


Instructions to the candidates:
1) Question one is compulsory.
2) Solve Q2 or Q3, Q4 or Q5, Q6 or Q7 and Q8 or Q9.
3) Neat diagrams must be drawn wherever necessary.
4) Assume suitable data wherever necessary.

Q1) [10]
a) Which of the following keyword is used in user defined function header
in Python?
i) define ii) def
iii) function iv) fun
b) Which one of the following is the correct way of calling a function?
i) f_name() ii) call f_name()
iii) return f_name() iv) function f_name()
c) Which function is used to convert a numeric value to a character.
i) ord() ii) chr()
iii) input() iv) output()
d) What is the correct file extension for python files?
i) .pt ii) .pyt
iii) .py iv) .cpp
e) Which method can be used to return a string in upper case letters?
i) toupper() ii) upper()
iii) uppercase() iv) touppercase()
f) Which method is automatically executed when an object of a class is
created?
i) _init_() ii) _call_()
iii) _repr_() iv) _del_()

P.T.O.

Join @PuneEngineers | Telegram


g) You can use Python for
i) Application programming ii) Web programming
iii) Artificial Intelligence iv) All of these
h) Which is the default access mode in the open () function for files in
Python?
i) w ii) r
iii) a iv) w+
i) What does open() function return?
i) function ii) variable
iii) file object iv) None of these
j) Which of the following is the correct way of closing a file?
i) close(file) ii) close("file")
iii) file.closed() iv) file.close()

Q2) a) Define a function. Explain function definition and function call with an
example. [6]
b) What do you mean by local and global variables? Explain it with example.[5]
c) Write a program to swap two numbers using a function. [4]
OR
Q3) a) Explain the following types of function arguments with examples: [6]
i) Required arguments
ii) Keyword arguments
b) What is a lambda function? Explain it with a suitable example. [5]
c) What are the good Python programming practices? [4]

Q4) a) Explain any three string operations with suitable example. [6]
b) Explain slicing operation on string with suitable example. [5]
c) Write a program to count the number of characters and words in the given
string. s= “Programming and Problem Solving” [4]
OR
[5924]-9 2

Join @PuneEngineers | Telegram


Q5) a) Explain following string methods with example. [6]
i) count()
ii) find()
iii) swapcase()
b) What is a string? With the help of an example explain string comparison
operators. [5]
c) Explain ord() and chr() functions with suitable examples. [4]

Q6) a) Explain any three programming paradigms. [6]


b) Define a class in Python. Explain _init_() method with suitable example.[5]
c) Explain the concept of Inheritance and Polymorphism. [4]
OR
Q7) a) Explain the features of Object Oriented Programming. [6]
b) Explain class variables and object variables with suitable example. [5]
c) Explain class method with suitable example. [4]

Q8) a) What is a file? Differentiate between text and binary file. [6]
b) What is a dictionary? Explain how to create and access dictionary
elements. [5]
c) Explain relative and absolute path of a file. [4]
OR
Q9) a) Explain any three methods for reading and writing files. [6]
b) Explain different directory methods with suitable examples. [5]
c) Write a program to copy the contents of one file to another file. [4]


[5924]-9 3

Join @PuneEngineers | Telegram


Total No. of Questions : 9] SEAT No. :

8
23
P6995 [Total No. of Pages : 4

ic-
[5868]-107

tat
6s
F.E. (Semester - I & II)

0:1
110005 : PROGRAMMING AND PROBLEM SOLVING

02 91
8:4
(2019 Pattern) (Common)

0
20
8/0 13
Time : 2½ Hours] [Max. Marks : 70
0
8/2
Instructions to the candidates:
.23 GP

1) Question one is compulsory.


E

2) Solve Q2 or Q3, Q4 or Q5, Q6 or Q7, Q8 or Q9.


80

8
C

23
3) Neat diagrams must be wherever necessary.

ic-
4) Assume suitable data wherever necessary.
16

tat
8.2

6s
.24

0:1
Q1) i) Which one of the following is the correct way of calling a function?
91
49

8:4
a) f_name() b) call f_name()
30
20

c) return f_name() d) function f_name()


01
02
8/2

ii) What is the correct file extension for Python files?


GP
8/0

a) .pt b) .pyt
CE
80

8
23
c) .py d) .cpp
.23

ic-
16

iii) Which function is used to convert a numeric value to a character.


tat
8.2

6s

a) ord() b) chr()
.24

0:1
91

c) input() d) output()
49

8:4
30
20

iv) Which is the default access mode in the open () function for files in
01

Python?
02
8/2
GP

a) w b) r
8/0

c) a d) w+
CE
80

v) Which method can be used to return a string in upper case letters?


.23
16

a) toupper() b) upper()
8.2

c) uppercase() d) touppercase()
.24
49

P.T.O.

Other PYQs => www.studymedia.in/fe/pyqs


vi) Which method is automatically executed when an object of a class is

8
created?

23
ic-
a) _init_() b) _call_()

tat
c) _repr_() d) _del_()

6s
0:1
vii) You can use Python for

02 91
8:4
a) Application programming b) Web programming

0
20
c) 8/0 13
Artificial intelligence d) All of these
0
8/2
viii)Which of the following keyword is used in user defined function header
.23 GP

in Python?
E
80

8
a) define b) def
C

23
ic-
c) function d) fun
16

tat
ix) What does open() function return?
8.2

6s
.24

a) function b) variable
0:1
91
49

8:4
c) file object d) none of these
30
20

x) Which of the following is the correct way of closing a file?


01
02

a) close(file) b) close(“file”)
8/2
GP
8/0

c) file.closed() d) file.close()
CE
80

8
23
.23

Q2) a) Define a function. Explain function definition and function call with
ic-
16

tat
suitable example. [6]
8.2

6s

b) What is a lambda function? Explain with a suitable example. [5]


.24

0:1
91
49

c) What are the good Python programming practices?


8:4

[4]
30
20

OR
01
02

Q3) a) Explain the following types of function arguments with examples:[6]


8/2
GP

i) Required arguments
8/0
CE

ii) Keyword arguments


80
.23

b) What do you mean by local and global variables? Explain it with


16

example. [5]
8.2

c) Write a program to swap two numbers using a function. [4]


.24
49

[5868]-107 2

Other PYQs => www.studymedia.in/fe/pyqs


Q4) a) Explain the following string operations with suitable example. [6]

8
23
i) Concatenation

ic-
tat
ii) Appending

6s
iii) String repetition

0:1
02 91
8:4
b) Explain indexing and slicing operation on string with suitable example.

0
20
8/0 13 [5]

c) Write a program to count the number of characters and words in the


0
8/2
.23 GP

given string. [4]


E

s = “Welcome to the world of python programming”


80

8
C

23
OR

ic-
16

tat
Q5) a) Explain following string methods with example. [6]
8.2

6s
.24

0:1
i) strip()
91
49

8:4
ii) index()
30
20

iii) isdigit()
01
02
8/2
GP

b) What is a string? Explain with example iterating strings. [5]


8/0

c) Explain ord() and chr() functions with suitable examples.


CE

[4]
80

8
23
.23

ic-
16

tat
Q6) a) Explain any three programming paradigms. [6]
8.2

6s

b) Define a class in Python. Explain_init_() method with suitable example.


.24

0:1
91

[5]
49

8:4
30
20

c) Explain the concept of a class and an object in OOP. [4]


01
02

OR
8/2
GP

Q7) a) Explain the following features of Object Oriented Programming. [6]


8/0
CE
80

i) Data encapsulation
.23

ii) Data abstration


16
8.2

iii) Polymorphism
.24
49

[5868]-107 3

Other PYQs => www.studymedia.in/fe/pyqs


b) Explain class variables and object variable with suitable example. [5]

8
23
c) Write a program to create a class ‘Employee’ with two attributes.

ic-
Display the details of two employees. [4]

tat
6s
0:1
02 91
Q8) a) What is a file? Explain different access modes for opening files. [6]

8:4
0
20
b) What is a dictionary? How to create, access and modify dictionary
elements.
8/0 13 [5]
0
8/2
.23 GP

c) Explain relative and absolute path of a file. [4]

OR
E
80

8
C

23
Q9) a) Explain any three methods for reading and writing files. [6]

ic-
16

tat
b) Explain different directory methods with suitable examples. [5]
8.2

6s
.24

0:1
c) Write a program to read first 10 characters from the file and display it.
91
49

[4]
8:4
30
20
01
02


8/2
GP
8/0
CE
80

8
23
.23

ic-
16

tat
8.2

6s
.24

0:1
91
49

8:4
30
20
01
02
8/2
GP
8/0
CE
80
.23
16
8.2
.24
49

[5868]-107 4

Other PYQs => www.studymedia.in/fe/pyqs

You might also like