0% found this document useful (0 votes)
25 views2 pages

CIE 3_Set 2

Uploaded by

Nithish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

CIE 3_Set 2

Uploaded by

Nithish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Reg.

No

Sona College of Technology (Autonomous), Salem -5.


SET - 1 Department of Civil Engineering and Mechanical Engineering
Continuous Internal Evaluation– III
U19PPR105 - Problem Solving using Python Programming
Common to All sections ( Year: I / Semester: II)
Date : Marks : 50

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

(ii Consider two text files “test.txt” and “sample.txt”. Write a 7


HOT
) python code to append the contents of “sample.txt” after S
4
“test.txt” in a new file “merge.txt”.
(OR)
(b (i) Explain different types of arguments and return types in python 7 LOTS 4
) function with example.
(ii Write a python code to find the sum of ‘n’ natural 7 HOT 4
S
) numbers using recursive function.

10 (a) (i) Explain various operations on list datatype in 7 LOTS 5


. python with example.
(ii Write a python code to get five students personal details and five 7 HOT 5
S
) subject marks, store it in list and display the total marks of each
along with the personal details.
(OR)
(b (i) Write a python program and explain any three different sorting 7 LOTS 5
) algorithms with examples.

(ii Write a Python program to check if a specified element appears 7 HOT 5


S
) in a tuple of tuples.
Original list:
(('Red', 'White', 'Blue'), ('Green', 'Pink', 'Purple'), ('Orange',
'Yellow', 'Lime'))
 Check if White present in said tuple of tuples
True
 Check if White present in said tuple of tuples
True
 Check if Olive present in said tuple of tuples
False
***************************
Bloom’s LOTS HOTS Total
Percentag
e
50 50 100

You might also like