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

Python Paper 123

PYTHON

Uploaded by

lavkumardixit
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)
24 views

Python Paper 123

PYTHON

Uploaded by

lavkumardixit
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/ 3

Subject Code:- BCC-302

Roll No:
R D ENGINEERING COLLEGE
(SEM 3) SESSIONAL EXAMINATION
2024-25
SUBJECT NAME:- PYTHON
Time: 2 Hours Total Marks: 60
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.

SECTION A
1. Attempt all questions in brief.

Qno. Questio Marks CO


n
a. What is LIST? Explain repetition of LIST with program. 2 1
b. Explain the use of break and continue with a suitable example. 2 2
c. Consider the program: x = ['12', 'hello', 456] 2 3
x[0] *= 3
x[1][1] = 'bye'
Explain why this program generates an error.
d. Write a program to check an input year is leap year or not. 2 2
e. What is python Block? Explain with program. 2 1

SECTION B
2. Attempt any six of the following:

Qno. Questio Marks CO


n
a. Write a Python function, alternating(lst), that takes as argument a 5 2
sequence lst. The function returns True if the elements in lst are
alternately odd and even, starting with an even number. Otherwise it
returns False.
For example:
alternating([10, 9, 9, 6]) returns False
alternating([10, 15, 8]) returns True
alternating([10]) returns True
alternating([]) returns True
alternating([15, 10, 9]) returns False
b. Write a python program to accept the string which contains all vowels. 5 2
c. What is string manipulation? Explain five types of function in string 5 2
with programs.
d. Write a Python program to print 5 2
A
BC
DEF
GHIJ
e. How to define Dictionary? Explain five functions with programs. 5 3
f. What is LIST manipulation? Explain five types of function in LIST with 5 3
programs.
g. Write a program to sort the word alphabetically from the string obtained 5 3
as input.
h. Explain Tuple with five functions. 5 3
SECTION C
3. Attempt any two part of the following:

Qno. Questio Marks CO


n
a. Write a python program to implement STACK. 10 3
b. Write a program to add two matrices. 10 2
c. What is conditional statement? Explain all types with programs. 10 1

Date of Examination: Verified by

You might also like