DR. R. K.
SHANMUGAM COLLEGE OF ARTS AND SCIENCE, KALLAKURICHI
MODEL EXAMINATION – 2024
Register Number:
Name of the Candidate: Date:
College Code: 302 Max. Marks: 75
Programme Code & Name : 214 & B. Sc., Computer Science Time: 3 Hrs
Course Code & Name: 23UCSCC13 & Python Programming
Part – A 10 x 1 = 10 Marks
(Answer ALL Questions)
1. Define Dictionaries.
2. Who developed Python Programming Language?
a) Wick van Rossum b) Rasmus Lerdorf
c) Guido van Rossum d) Niene Stom
3. What will be the value of ‘result’ in following Python program?
list1 = [1,2,3,4]
list2 = [2,4,5,6]
list3 = [2,6,7,8]
result = list()
result.extend(i for i in list1 if i not in (list2+list3) and i not in result)
result.extend(i for i in list2 if i not in (list1+list3) and i not in result)
result.extend(i for i in list3 if i not in (list1+list2) and i not in result)
a) [1, 3, 5, 7, 8] b) [1, 7, 8] c) [1, 2, 4, 7, 8] d) error
4. Match the following
List – I List – II
A Function Keyword 1 Preferred Installer Program
B pip 2 Remainder
C bytes, bytearray 3 def
D % operator returns 4 Binary Types
A B C D A B C D
(A) 1 2 3 4 (B) 4 2 1 3
(C) 4 1 2 3 (D) 3 1 4 2
5. Match the following
A: list 1. read() and write()
B: key functions 2. mode
C: open an existing file 3. insert()
D:
(A) X:3, Y:1, Z: 2 (B) X:1, Y: 2, Z: 3
(C) X:3, Y:2, Z: 1 (D) X:2, Y:1, Z:3
6. Explain the Dictionaries.
7. Select which the following shows the types of function calls in Python:
a) Call by value b) Call by reference c) Both A and B
(1/2)
8. Describe a Deleting Elements in a tuple
9. Explain writelines() method.
10. Elucidate the append() method
Part – B 5 x 7 = 35 Marks
Answer ALL Questions
11. (a) Write a short note on sets and list
(OR)
(b) Explain max (), min (), len(), pow(), sum(), functions with an example.
12. (a) Explain the syntax of the following statements
For loop, while loop, if - else, if-elif-else
(OR)
(b) Explain in detail about Control flow structures in python.
13. (a) Explain Modules and import statement
(OR)
(b) Write a short note on Namespace and scope.
14. (a) Give the differences between lists and dictionary.
(OR)
(b) Write a short note on Basic list operations
15. (a) Write a short note on Types of files in Python
(OR)
(b) Explain about Reading and Writing files
Part – C 3 x 10 = 30 Marks
Answer ANY THREE Questions
16. Explain about Python Arrays Processing and methods.
17. Explain in detail about the Jump Statements.
18. Describe the Function Arguments.
19. Give a detailed note on list Updating, Nested lists, Basic list operations and Methods.
20. Describe the detail about Renaming and deleting files
(2/2)