CIE 3_Set 2
CIE 3_Set 2
No
Outcomes
Levels of
Course
B.T
Time slot : 9.15 – 10.45AM Duration : 1 ½
hours
PART – A Answer All Questions (6 x 2 = 12
Marks)
1. Distinguish local and global scope of a variable with example. LOTS 4
2. What is the use of the following built-in functions? Give example.
HOT
a) len() S
4
b) abs()
3. List the various file access modes in python. LOTS 4
4. What is mutable datatype ? Give an example. LOTS 5
5. Given a tuples with elements : [(1, 2), (2, 3), (3, 4)] HOT
5
Convert the above tuples to a list. S
6. Write a Python code to add a key to a dictionary.
HOT
Sample Dictionary : {0: 10, 1: 20} S
5
Expected Result : {0: 10, 1: 20, 2: 30}
PART – B Answer All Questions (2 x 5 = 10
Marks)
7. Write a Python function that accepts a string and counts the number of upper and
lower case letters.
Sample String : 'The quick Brow Fox' HOT
4
Expected Output : S
No. of Upper case characters : 3
No. of Lower case Characters : 12
8. Explain various operations and methods of a set with example. LOTS 5
PART – C Answer All Questions (2 x 14 = 28
Marks)
9. (a) (i) Explain the various I/O operations of a file with example. 7 LOTS 4