0% found this document useful (0 votes)
8 views19 pages

pwp merged qp

The document outlines an examination paper with various questions related to Python programming, covering topics such as data types, operators, file handling, classes, and functions. It includes instructions for students regarding the examination format and rules, such as answering on new pages and prohibiting electronic devices. The paper consists of multiple sections with questions that require programming tasks, explanations, and examples.

Uploaded by

1234mayurk
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)
8 views19 pages

pwp merged qp

The document outlines an examination paper with various questions related to Python programming, covering topics such as data types, operators, file handling, classes, and functions. It includes instructions for students regarding the examination format and rules, such as answering on new pages and prohibiting electronic devices. The paper consists of multiple sections with questions that require programming tasks, explanations, and examples.

Uploaded by

1234mayurk
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/ 19

22616

21222
3 Hours / 70 Marks Seat No.
15 minutes extra for each hour

Instructions – (1) All Questions are Compulsory.


(2) Answer each next main Question on a new page.
(3) Illustrate your answers with neat sketches wherever
necessary.
(4) Figures to the right indicate full marks.
(5) Assume suitable data, if necessary.
(6) Mobile Phone, Pager and any other Electronic
Communication devices are not permissible in
Examination Hall.

Marks

1. Attempt any FIVE of the following: 10


a) Name different modes of python.
b) List identity operators in python.
c) Give two differences between list and tuple.
d) Explain Local and Global variable.
e) Define class and object in python.
f) How to give single and multiline comment in python.
g) List different modes of opening file in python.

P.T.O.
22616 [2]
Marks
2. Attempt any THREE of the following: 12
a) Write a program to print following :
1
1 2
1 2 3
1 2 3 4
b) Explain four Buit-in tuple functions python with example.
c) Explain how to use user defined function in python with
example.
d) Write a program to create class EMPLOYEE with ID and
NAME and display its contents.

3. Attempt any THREE of the following: 12


a) List Data types used in python. Explain any two with
example.
b) Explain membership and assignment operators with example.
c) Explain indexing and slicing in list with example.
d) Write a program for importing module for addition and
substraction of two numbers.

4. Attempt any THREE of the following: 12


a) Write a program to create dictionary of students that
includes their ROLL NO. and NAME.
i) Add three students in above dictionary
ii) Update name = ‘Shreyas’ of ROLL NO = 2
iii) Delete information of ROLL NO = 1
b) Explain decision making statements If - else, if - elif - else with
example.
c) Explain use of format () method with example.
d) Explain building blocks of python.
e) Write a program illustrating use of user defined package in
python.
22616 [3]
Marks
5. Attempt any TWO of the following: 12
a) Write the output of the following :
i) >>> a = [ 2, 5, 1, 3, 6, 9, 7 ]
>>> a [ 2 : 6 ] = [ 2, 4, 9, 0 ]
>>> print (a)

ii) >>> b = [ “Hello” , “Good” ]


>>> b. append ( “python” )
>>> print (b)

iii) >>> t1 = [ 3, 5, 6, 7 ]
>>> print ( t1 [2] )
>>> print ( t1 [–1] )
>>> print ( t1 [2 :] )
>>> print ( t1 [ : ] )

b) Explain method overloading in python with example.


c) Write a program to open a file in write mode and append
some contents at the end of file.

6. Attempt any TWO of the following: 12


a) Explain package Numpy with example.
b) Write a program to implement the concept of inheritance in
python.
c) Explain Try-except block used in exception handling in
python with example.
22616
22223
3 Hours / 70 Marks Seat No.

Instructions – (1) All Questions are Compulsory.


(2) Answer each next main Question on a new page.
(3) Illustrate your answers with neat sketches wherever
necessary.
(4) Figures to the right indicate full marks.
(5) Assume suitable data, if necessary.
(6) Mobile Phone, Pager and any other Electronic
Communication devices are not permissible in
Examination Hall.

Marks

1. Attempt any FIVE of the following: 10


a) List features of Python.
b) Describe membership operators in python.
c) Write down the output of the following Python code
>>>indices=['zero','one','two','three','four','five']
i) >>>indices[:4]
ii) >>>indices[:-2]
d) Describe any two data conversion function.
e) With neat example explain default constructor concept in Python.
f) Describe mkdir( ) function.
g) Describe Multiline comment in python.

P.T.O.
22616 [2]
Marks
2. Attempt any THREE of the following: 12
a) Describe Keyword "continue" with example.
b) Explain creating Dictionary and accessing Dictionary
Elements with example.
c) Explain any four Python's Built-in Function with example.
d) Write a Python program to find the factorial of a number
provided by the user.

3. Attempt any THREE of the following: 12


a) Write a python program to input any two tuples and interchange
the tuple variables.
b) Explain Bitwise operator in Python with appropriate example.
c) With neat example differentiate between readline( ) and
readlines( ) functions in file-handling.
d) Describe 'Self' Parameter with example.

4. Attempt any THREE of the following: 12


a) Differentiate between list and Tuple.
b) Explain any four file modes in Python.
c) Write a program to show user defined exception in Python.
d) Explain Module and its use in Python.

5. Attempt any TWO of the following: 12


a) Write a Python Program to check if a string is palindrome
or not.
b) Write a Python program to calculate sum of digit of given
number using function.
c) Write a Python Program to accept values from user in a list
and find the largest number and smallest number in a list.
22616 [3]
Marks
6. Attempt any TWO of the following: 12
a) Explain any six set function with example.
b) Design a class student with data members : name, roll no.,
department, mobile no. Create suitable methods for reading
and printing student information.
c) With suitable example explain inheritance in Python.
22616
23124
3 Hours / 70 Marks Seat No.

Instructions – (1) All Questions are Compulsory.


(2) Answer each next main Question on a new page.
(3) Illustrate your answers with neat sketches wherever
necessary.
(4) Figures to the right indicate full marks.
(5) Assume suitable data, if necessary.
(6) Mobile Phone, Pager and any other Electronic
Communication devices are not permissible in
Examination Hall.

Marks

1. Attempt any FIVE of the following : 10


a) Enlist applications for python programming.
b) Write the use of elif keyword in python.
c) Describe the Role of indentation in python.
d) Define Data Hiding concept ? Write two advantages of
Data Hiding.
e) State use of namespace in python.
f) State the use of read ( ) and readline ( ) functions in python file
handling.
g) Explain two ways to add objects / elements to list.

P.T.O.
22616 [2]
Marks
2. Attempt any THREE of the following : 12
a) Explain membership and Identity operators in Python.
b) Write python program to display output like.
2
4 6 8
10 12 14 16 18
c) Explain four built-in list functions.
d) Write python program using module, show how to write and
use module by importing it.

3. Attempt any THREE of the following : 12


a) Describe various modes of file object ? Explain any two
in detail.
b) Explain use of Pass and Else keyword with for loops in python.
c) T = (‘spam’, ‘Spam’, ‘SPAM!’, ‘SaPm’)
print (T [2] )
print (T [-2] )
print (T [2:] )
print (List (T) )
d) Explain method overloading and overriding in python.

4. Attempt any THREE of the following : 12


a) Explain different functions or ways to remove key : value
pair from Dictionary.
b) Explain Numpy package in detail.
c) Explain seek ( ) and tell ( ) function for file pointer
manipulation in python with example.
d) WAP to read contents of first.txt file and write same content
in second.txt file.
22616 [3]
Marks
5. Attempt any TWO of the following : 12
a) Explain any four set operations with example.
b) Explain building blocks of python.
c) Write a program illustrating use of user defined package
in python.

6. Attempt any TWO of the following : 12


a) Write a program to create class student with Roll no. and
Name and display its contents.
b) Write program to implement concept of inheritance in python.
c) List and explain any four built-in functions on set.
22616
23242
3 Hours / 70 Marks Seat No.

Instructions – (1) All Questions are Compulsory.


(2) Answer each next main Question on a new page.
(3) Illustrate your answers with neat sketches wherever
necessary.
(4) Figures to the right indicate full marks.
(5) Assume suitable data, if necessary.
(6) Use of Non-programmable Electronic Pocket
Calculator is permissible.
(7) Mobile Phone, Pager and any other Electronic
Communication devices are not permissible in
Examination Hall.

Marks

1.
Attempt any FIVE of the following: 10
a) Enlist any four data structures used in python.
b) Give membership operators in python.
c) Write syntax for a method to sort a list.
d) Write use of matplotlib package in python.
e) What is data obstruction and data hiding.
f) Write the syntax of fopen.
g) What is dictionary?

P.T.O.
22616 [2]
Marks
2.
Attempt any THREE of the following: 12
a) Explain with example:
i) Indentation
ii) Variables
b) Print the following pattern using loop:
1 0 1 0 1 0 1
1 0 1 0 1
1 0 1
1
c) Write python program to perform following operations on set.
i) Create set of five elements
ii) Access set elements
iii) Update set by adding one element
iv) Remove one element from set.
d) Describe following Standard Packages
i) Numpy
ii) Pandas

3.
Attempt any THREE of the following: 12
a) What is the output of the following program?
dict1 = {‘Google’ : 1, ‘Facebook’ : 2, ‘Microsoft’ : 3}
dict2 = {‘GFG’ : 1, ‘Microsoft’ : 2, ‘Youtube’ : 3}
dict1⋅update(dict2);
for key, values in dictl⋅items( ):
print (key, values)
b) Write a python program that takes a number and checks
whether it is a palindrome.
c) Write a python program to create a user defined module that
will ask your program name and display the name of the
program.
d) List data types used in python. Explain any two with
example.
22616 [3]
Marks
4.
Attempt any THREE of the following: 12
a) Compare list and tuple (any four points).
b) Write a python program takes in a number and find the sum
of digits in a number.
c) Write a program function that accepts a string and calculate
the number of uppercase letters and lower case letters.
d) Write a python program to create class student with roll-no
and display its contents.
e) Explain following functions with example:
i) The open( ) function
ii) The write( ) function

5.
Attempt any TWO of the following: 12
a) Write the output for the following if the variable course =
“Python”
>>> course [ : 3 ]
>>> course [ 3 : ]
>>> course [ 2 : 2 ]
>>> course [ : ]
>>> course [ -1 ]
>>> course [ 1 ]
b) Write a python program to generate five random integers
between 10 and 50 using numpy library.
c) Write a Python program to create a class ‘Diploma’ having
a method ‘getdiploma’ that prints “I got a diploma”. It
has two subclasses namely ‘CO’ and ‘IF’ each having a
method with the same name that prints “I am with CO
diploma” and ‘I am with IF diploma’ respectively. Call
the method by creating an object of each of the three
classes.

P.T.O.
22616 [4]
Marks
6.
Attempt any TWO of the following: 12
a) Explain multiple inheritance and write a python program to
implement it.
b) Write a Python program to create user defined exception that
will check whether the password is correct or not.
c) Describe various modes of file object. Explain any three in
detail.
22616
12425
03 Hours / 70 Marks Seat No.

Instructions – (1) All Questions are Compulsory.


(2) Assume suitable data, if necessary.
(3) Use of Non-programmable Electronic Pocket
Calculator is permissible.
(4) Mobile Phone, Pager and any other Electronic
Communication devices are not permissible in
Examination Hall.

Marks

1. Attempt any FIVE of the following: 10


a) List features of Python.
b) List membership operators in Python.
c) Compare list and Tuple.
d) List different object oriented features supported by Python.
e) State how to perform comments in Python.
f) Define class and object.
g) List different modes of opening file in Python.

P.T.O.
22616 [2]
Marks
2. Attempt any THREE of the following: 12
a) Explain decision making statements if-else, if-elif-else with
example.
b) Describe any four methods of list in Python.
c) Write a program illustrating use of user defined package in
Python.
d) Describe various modes of file object? Explain any two in
detail.

3. Attempt any THREE of the following: 12


a) Explain identity and assignment operators with example.
b) How to create dictionary in Python? Write any three methods
of dictionary.
c) Explain how to use user defined function in Python with
example.
d) Describe the concept of inheritance in Python with example.

4. Attempt any THREE of the following: 12


a) Explain loop control statement in Python.
b) Illustrate with example method overloading.
c) Write a Python program to check for zero division errors
exception.
d) Write the output for the following if the variable fruit = ‘banana’.
>> fruit [:3]
>> fruit [3:]
>> fruit [3:3]
>> fruit [:]
e) Write a Python program to read contents from “a.txt” and write
same contents in “b.txt”.
22616 [3]
Marks
5. Attempt any TWO of the following: 12
a) Explain basic operation performed on set with suitable example.
b) How to write, import and alias modules.
c) Design a class student with data members; Name, Roll No.,
Address. Create suitable method for reading and printing students
details.

6. Attempt any TWO of the following: 12


a) Determine various data types available in Python with example.
b) Write a Python program to read contents of first.txt file and
write same content in second.txt file.
c) Explain Try-except-else-finally block used in exception handling
in Python with example.
22616
12223
3 Hours / 70 Marks Seat No.

Instructions – (1) All Questions are Compulsory.

(2) Illustrate your answer with neat sketches wherever


necessary.

(3) Figures to the right indicate full marks.

(4) Assume suitable data, if necessary.

(5) Use of Non-programmable Electronic Pocket


Calculator is permissible.

(6) Mobile Phone, Pager and any other Electronic


Communication devices are not permissible in
Examination Hall.

Marks

1. Attempt any FIVE of the following: 10


a) List Python features. (Any four)
b) List comparision operators in Python.
c) Describe Tuples in Python.
d) Write use of lambda function in python.
e) Write syntax of defining class in Python.
f) List file operations in Python.
g) Describe indentation in Python.

P.T.O.
22616 [2]
Marks
2. Attempt any THREE of the following: 12
a) Describe bitwise operators in Python with example.
b) Write any four methods of dictionary.
c) What is local and global variables? Explain with appropriate
example.
d) Write python program to illustrate if else ladder.

3. Attempt any THREE of the following: 12


a) Write basis operations of list.
b) Write Python code for finding greatest among four numbers.
c) Illustrate with example method over loading.
d) Explain how try-catch block is used for exception handling in
python.

4. Attempt any THREE of the following: 12


a) Compare list and dictionary. (Any 4 points)
b) What is command line argument? Write python code to add
two numbers given as input from command line arguments and
print its sum.
c) Write python code to count frequency of each characters in a
given file.
d) Write python program to read contents of abc.txt and write
same content to pqr.txt.

5. Attempt any TWO of the following: 12


a) Write different data types in python with suitable example.
b) Example module. How to define module.
c) Write python program to perform following operations on Tuples;
i) Create set
ii) Access set Element
iii) Update set
iv) Delete set
22616 [3]
Marks
6. Attempt any TWO of the following: 12
a) Explain mutable and immutable data structures.
b) Design a class student with data members; Name, roll number
address. Create suitable method for reading and printing students
details.
c) Create a parent class named Animals and a child class
Herbivorous which will extend the class Animal. In the child
class Herbivorous over side the method feed ( ). Create a object
of the class Herbivorous and call the method feed.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy