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

python- 4th sem

The document is an examination paper for a Python Programming course at Maulana Abul Kalam Azad University of Technology, West Bengal. It includes various types of questions such as very short answer type, short answer type, and long answer type, covering topics like Python syntax, functions, inheritance, and data structures. The paper is structured to assess students' understanding and application of Python programming concepts within a 3-hour timeframe for a total of 70 marks.

Uploaded by

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

python- 4th sem

The document is an examination paper for a Python Programming course at Maulana Abul Kalam Azad University of Technology, West Bengal. It includes various types of questions such as very short answer type, short answer type, and long answer type, covering topics like Python syntax, functions, inheritance, and data structures. The paper is structured to assess students' understanding and application of Python programming concepts within a 3-hour timeframe for a total of 70 marks.

Uploaded by

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

CS/BCA(A)/E\:'EN/SEM-4/400088/2023-2024/1108

-·---·---.,.

~
MAULANA ABUL KAIAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL
Paper Code: BCACA03 Python Programming
UPID: 400088

Time Allotted : 3 Hours Full Marks : 70


The Figures in the margin Indicate full marks.
Candidate are required to give their answers in the/r own words as far as practicable

I 1. Answer any ten of the following :


l•l
Group-A (Very Short Answer Type Question)

What will be the output of the following Python code?


( 1 X 10 = 10]

»> a={5, 4}

))) b={l,2,4,5}

»> a(b
<111 What is the extension of the Python file?
(Ill) What will be the output of the following Python program?

i =0

while i < 5:
print(i)
i += 1
if i == 3:
break
else:
!
i
I print(0)
!
/
jlVl Suppose listl is [2, 33, 222, 14, 25], What is listl[:-1]?
(¥( What will be the output of the,following Python code?

)))my_tuple = (1, 2, 3, 4)
)))my_tuple.append( (5, 6, 7))
.)))print len{my_tuple)
(Vil

(VII)
What will be the value of the following Python expression?
4+3%5
What will be the output of the following PythoH code?
(
print("Hello {0(0]} and {0(1]}".format(('foo', 'bin')))
(Y111l What will be the output of the following Python code?

a=[ 13, 56, 17]


a.append([87])
a.extend([45,67])
print(a)

(i{i What will be the output of the following Python code?

~
1/2

II.
~ ~ - -......... ....,
(~;
,0

/
/
~ >» a=~,s,s)
>» b=(2, 8, ~
>» ~ ~•"--\:(~+ceb')
In python?
(Xl What is. the order of preceden
......
(XI) The process of pickling
in Python Includes _ _ __
following Python code?
1xnf What will be the output of the

>>>t = (1, 2, 4, 3, 8, 9)
2)]
»> [t[i ] for i in range(0, len( t),
stion)
Group-B (Short Answer Type Que { 5 X 3 = 15)
Answer any three of the following :
{5)
the same value for every class instance (object).
2. Define a property that must have [SJ
3. Define variable in Python? {SJ
4. Is elif a nested if in Python? (SJ
5. What are functions in Python? [SJ
nct integers.
ible unique subsets from a set of disti
6. Write a Python class to get all poss
)
Group-C (Long Answer Type Question [ 15 X 3 = 45]
Answer any three of the following :
[ 5]
7. (a) Define functions in Python. [ 10 J
ks whether the number i_s
a number as a parameter and chec
(b) Write a Python function that takes
prime or not. [ 10 J
Python?
disadvantages of using a for loop in
.8. (a) What are the advantages and [ 5]
t in a for loop in Pyth on?
{b) How can I use a break statemen [ 10]
on with an example.
'9. (a) Explain Inheritance in Pyth f5]
on?
{b) How are classes created in Pyth [ 15 J
name and student_class from
e a Python func tion student_data () that will take as argument student_
10. Writ
and class.
the user and print the student name [5J
in Python?
11. (a) How to comment multiple lines [ 10]
Explain with an example.
(b) What is a dictionary in Python?

**• END OF PAPER •••

2/2

You might also like