0% found this document useful (0 votes)
23 views4 pages

PPS - Oct - Nov - 2022

Uploaded by

SUMEDH PATIL
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)
23 views4 pages

PPS - Oct - Nov - 2022

Uploaded by

SUMEDH PATIL
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/ 4

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

You might also like