WWW - Manaresults.co - In: Python Programming
WWW - Manaresults.co - In: Python Programming
WWW - Manaresults.co - In: Python Programming
C20-CM-WD-505
*
7639
BOARD DIPLOMA EXAMINATION, (C-20)
DECEMBER—2022
DCME - FIFTH SEMESTER EXAMINATION
PYTHON PROGRAMMING
PART—A 3×10=30
3. Write a Python program to read age of citizen and check whether citizen
is eligible for voting or not.
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.
www.manaresults.co.in
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.
(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)
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.
(OR)
(b) Write the syntax for try, except, else, finally clauses and explain
with a sample program.
*
/7639 2 [ Contd...
www.manaresults.co.in
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
2 2
If the input is 9
print 1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6 6 6 6 6 6
7 7 7 7 7 7 7
8 8 8 8 8 8 8 8
9 9 9 9 9 9 9 9 9
*
/7639 3 AA22–PDF
www.manaresults.co.in