0% found this document useful (0 votes)
13 views3 pages

Python Programming Exam Questions

The document outlines an end-semester examination for a Python Programming course, detailing the structure, total marks, and types of questions included. It consists of multiple-choice questions, programming tasks, and theoretical questions covering various Python concepts such as functions, loops, and file operations. The exam is designed for BCA/BCA-MCA students and spans a duration of 3 hours.

Uploaded by

kanodiyaaryan62
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)
13 views3 pages

Python Programming Exam Questions

The document outlines an end-semester examination for a Python Programming course, detailing the structure, total marks, and types of questions included. It consists of multiple-choice questions, programming tasks, and theoretical questions covering various Python concepts such as functions, loops, and file operations. The exam is designed for BCA/BCA-MCA students and spans a duration of 3 hours.

Uploaded by

kanodiyaaryan62
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

Total No. of Questions: 6 Total No.

of Printed Pages:3

Enrollment No......................................

Faculty of Science/Engineering
End Sem Examination Dec 2024
CA3EL06 Python Programming
Programme: BCA/BCA-MCA Branch/Specialisation:
(Integrated) Computer Application
Duration: 3 Hrs. Maximum Marks: 60
Note: All questions are compulsory. Internal choices, if any, are indicated. Answers of
Q.1 (MCQs) should be written in full instead of only a, b, c or d. Assume suitable data if
necessary. Notations and symbols have their usual meaning.
Marks BL PO CO PSO
Q.1 i. What is the output of this expression, print 1
(2**0)? 01 01 01

(a) 1 (b) 0 (c) 2 (d) 3


ii. Which one is python membership operator? 1
01 01 01
(a) Not (b) And (c) Or (d) in
iii. In tuple, if we assign the value without comma it is 1
treated as-
(a) String
03 02 01
(b) Decimal
(c) Integer
(d) None of these
iv. What will be the output of following snippet- 1
v= [1,2,3,4,5] print(v [3:0:-1])
(a) Syntax error 04 02 03
(b) [4,3,2]
(c) [4,3]
(d) [4,3,2,1]
v. What will be the output of following snippet:- 1
X=10
While(x>0)
X-=3
04 02 03
Print(x, end=” “)
(a) 7 4 1 (b) 7 5 2 0
(c) 7 4 1 -2 (d) 7 4 1 -2 -5

P.T.O.
[2] [3]
vi. What will be the output of following code- 1 OR iii. What is Dictionary? write a program to concatenate 8
For i in range(3): two dictionaries into one. 05 03 03

For j in range(3):
Print(i*j, end=’’) 03 02 03

Print() Q.4 i. Explain range function with two and three 3


03 03 03

(a) 000 012 024 (b) 012 024 036 parameters.


(c) 000 012 036 (d) 000 012 012 ii. Explain while loop. Write a python program to print 7
vii. The following python program can work 1 the following pattern using loop-
with_______ parameters. *****
Def fun(x): **** 06 04 03

Def f1(*args, **kwargs): ***


Print(“Medi-Caps”) **
03 02 03
Returen *
X(*args, **kwargs) OR iii. Write a program to demonstrate break, continue 7
03 02 01
Return f1 and pass statement with example.
(a) 0 (b) 1
(c) 2 (d) Any number of Q.5 i. What is function? Demonstrate the use of args 4
03 02 03
[Link] The keyword we use to define function is- 1 and kwargs with example.
(a) define (b) call 02 01 01 ii. How recursive function works? Demonstrate a 6
(c) def (d) fun program to generate Fibonacci series using 06 04 03

ix. To open a file D:\[Link] for writing, we use- 1 recursion.


(a) outfile = open(“c:\[Link]”, “w”) OR iii. Describe random module? Write a program to 6
04 03 03
(b) outfile = open(“c:\\[Link]”, “w”) 03 02 02 generate random number
(c) outfile = open(file = “c:\[Link]”, “w”)
(d) outfile = open(file = “c:\\[Link]”, “w”) Q.6 Attempt any two-
x. How many except statements can a try-except 1 i. Write a program to read file and write file data in 5
block have? python.
03 02 03

02 02 02
(a) Zero (b) One ii. Explain file operations take place in python with 5
(c) More than one (d) More than zero syntax and example.
02 01 02

iii. What is exception handling? Write a program to 5


03 02 03
Q.2 i. Write the features of python. 2 02 02 02 demonstrate try with else clause.
ii. Write the difference between Python2 and Python3 8
04 03 03
with example. ******
OR iii. What is operator? Describe any four operators used 8
01 01 01
in python with syntax and example.

Q.3 i. Explain built in functions of python list. 2 02 01 02

ii. What is tuple? How tuple() constructor works in 8


05 03 03
python.
[4]
3 Marks for Demonstrate the use of args and kwargs with
example.
Marking Scheme ii. 2 Marks for how recursive function works and 4 marks for a 6
CA3EL06 (T) Python Programming (T) program to generate Fibonacci series using recursion.
OR iii. 2 marks for describe random module and 6
4 marks for program to generate random number.
Q.1 i) (a) 1 1
ii) (d)in 1
Q.6
iii) (d) None of these 1
i. 2.5 marks for code of read file and 5
iv) (b) [4,3,2] 1
2.5 marks for write file data in python.
v) (c) 7 4 1 -2 1
ii. 5 marks for explaining any 5 file operations of python with syntax 5
vi) (a) 000 012 024 1
and example.
vii) (c) Any number of 1
iii. 2 marks for what is exception handling and 5
viii) (c) def 1
3 marks for Write a program to demonstrate try with else
ix) (b) outfile = open(“c:\\[Link]”, “w”) 1
clause.
x) (d) More than zero 1
******
Q.2 i. 2 marks for at least 3 feature. 2
ii. 6 Marks for difference and 2 Marks for example. 8
OR iii. 2 Marks for what is operator and 1.5 for each operator 8
explanation.

Q.3 i. 2 marks for any three built in functions of python list. 2


ii. 2 Marks for what is tuple, 8
2 marks for use of tuple() constructor works in python and
4 marks for program as an example.
OR iii. What is Dictionary? Write a program to Concatenate Two 8
Dictionaries into One.

Q.4 i. 1 Mark for Explain range function and 3


2 marks for example of two and three parameters.
ii. 3 Marks for explain while loop and 7
4 marks for a python program to print the following pattern using
loop.
OR iii. 5 marks for demonstrate break and continue and 7
2 marks for pass statement with example.

Q.5 i. 1 Marks for what is function and 4

P.T.O.

You might also like