0% found this document useful (0 votes)
8 views1 page

DSE1T

The document is an examination paper for B.Sc. 5th Semester students at Panskura Banamali College, focusing on Python programming. It includes questions on various Python concepts such as slicing, lambda functions, classes, and output of specific code snippets. Additionally, it features coding tasks and theoretical questions for students to answer.

Uploaded by

maitymahadeb530
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 views1 page

DSE1T

The document is an examination paper for B.Sc. 5th Semester students at Panskura Banamali College, focusing on Python programming. It includes questions on various Python concepts such as slicing, lambda functions, classes, and output of specific code snippets. Additionally, it features coding tasks and theoretical questions for students to answer.

Uploaded by

maitymahadeb530
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/ 1

PANSKURA BANAMALI COLLEGE 8) Find and write the output of the following Python code:

(AUTONOMOUS) TXT = [“20”, “50”, “30”, “40”]


th
B.Sc. 5 Semester Examination (ESE) 2023 CNT = 3
TOTAL = 0
BCA
for C in [7, 5, 4, 6]:
Paper: DSE1T
T = TXT [CNT]
Programming using Python TOTAL = float(T) + C
Full Marks: 40 Print(TOTAL)
Time: 2 hours CNT -= 1
(The figure in the margin indicate full marks. Candidates are required to
give their answers in their own words as far as practicable) Group-B
Group-A
Answer any four questions 4x5=20
Answer any five questions 5x2=10
9) How do you create a class in Python (with example)?
1) What is slicing in Python?
10) How can you create and manipulate tuples in Python?
2) How do you define a lambda function in Python?
11) Describe the differences between break, continue, and pass statements.
3) Write down two differences between List and Tuple.
12) What are negative indexes and why are they used?
4) What is Python libraries? Name a few of them.
13) What are decorators? What is the use of exit function?
5) How to generate a random number in Python?
14) What are advantages of List over Array?
6) Write down four Difference between mutable and immutable objects in
Python language with example.
Group-C
7) Write the output of the following Python program code:
def Change List (): Answer any one question 1x10=10
L = [] 15) Write a Python code to check if a number is an Armstrong number or not
L1=[] using a user-defined function. Explain the program with an example like
L2=[] 153. 5+5
for i in range (1,10): 16) Answer the following questions. 2+2+1+3+2
L.append (i) a. Explain how to create a dictionary in Python?
for i in range (10,1,-2): b. Explain what is rang () function and how it is used in lists?
L1.append (i) c. What is the output of print tuple [::2] if tuple =
for i in range (len (L1)): (‘abcd’,786,2.23,’john’,70.2)?
L2.append (L1 [i] + L[i]) d. What type of conditional structures are present in a programming
L2.append(len (L)-len(L1)) language? Explain each with example.
Print (L2) e. Explain about string slicing with examples.
Change List ()

You might also like