Board Diploma Examination, (C-20) DECEMBER-2022 Dcme - Fifth Semester Examination

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

C20-CM-WD-505

7639

*
7639
BOARD DIPLOMA EXAMINATION, (C-20)
DECEMBER—2022
DCME - FIFTH SEMESTER EXAMINATION
PYTHON PROGRAMMING

Time : 3 hours ] [ Total Marks : 80

PART—A 3×10=30

Instructions : (1) Answer all questions.


(2) Each question carries three marks.
(3) Answers should be brief and straight to the point and shall
not exceed five simple sentences.

1. List any three built-in functions of Python.

2. What is the use of pass statement in Python.

3. Write a Python program to read age of citizen and check whether citizen
is eligible for voting or not.

4. Write the syntax and purpose of lambda function in Python.

5. Write any three differences between local variable and global variable in
Python.
*
6. Write any three advantages of tuple over list.

7. What are Python sets? Write a python program to create a set and
display it.

8. Write the syntax for opening a file in Python and list the file opening
modes.

9. What is data abstraction in Python?

10. List any three built-in exceptions of Python.


*
/7639 1 [ Contd...
PART—B 8×5=40

*
Instructions : (1) Answer all questions.
(2) Each question carries eight marks.
(3) Answers should be comprehensive and criterion for
valuation is the content but not the length of the answer.

11. (a) Explain the applications of Python in various fields.

(OR)

(b) Write the syntax for defining a function. Write a python program
to find the Fibonacci series of 25 numbers using functions.

12. (a) Explain the syntax and purpose of break statement in Python.
Explain with a sample program.

(OR)

(b) Write the syntax for while loop in Python. Write a Python program
to find the factorial of a given integer using while loop.

13. (a) Explain string slicing and string immutability with a sample program.

(OR)

(b) Write a python program to access one modules variable and


function in another module.

14. (a) Write a Python program in which a function that accepts arguments
* and returns a tuple formed with those arguments.

(OR)

(b) Explain any four list methods with a sample python program.

15. (a) Explain method overloading with an example program.

(OR)

(b) Write the syntax for try, except, else, finally clauses and explain
with a sample program.
*
/7639 2 [ Contd...
PART—C 10×1=10

Instructions :
* (1) Answer the following question.
(2) The question carries ten marks.

16. Write a Python program to construct the following pattern, using nested
loop.
For example, if the input is 2
print 1
22
If the input is 9
print 1
22
33 3
44 4 4
55 5 5 5
66 6 6 6 6
77 7 7 7 7 7
88 8 8 8 8 8 8
99 9 9 9 9 9 9 9

★★★

*
/7639 3 AA22–PDF

You might also like