CT-3 Template
CT-3 Template
CO-1 : Interpret the fundamental Python syntax and semantics and be fluent in the use of Python
control flow statements.
CO-2 : Express proficiency in the handling of strings and functions
CO-3 : Determine the methods to create and manipulate Python programs by utilizing the data
structures like lists, dictionaries, tuples and sets.
CO-4 : Identify the commonly used operations involving file systems and regular expressions.
Section – A # 12 Marks
Q.1 : Attempt any Six questions (Short/Medium Answer Type). Each question is of 2
marks.
What do you mean by operator? Explain the category of operators with CO-1
b)
python program in detail.
Write a purpose to use break and continue statements, explain with CO-2
c)
examples.
What is the meaning of range function, and how to use it, explain with CO-2
d)
example?
Explain the concept of list in Python and demonstrate list slicing. (Provide CO-3
e)
examples).
Section – B # 18 Marks
Q.2 : Attempt any Six questions (Long Answer Type). Each question is of 3 marks.
a) CO-1
CO-2
CO-2
State which of the following Python statements are valid and invalid.
1. x = input("Enter a number")
c) 2. x = input()
3. x = input("")
4. x = input(" ' ")
5. x = input(2)
6. x = input("2" + "3")
d) Write a Python program to convert time from 12 hour to 24-hour format. CO-3
e) What do you mean by type casting? Explain with suitable example. CO-3
Illustrate different list slicing constructs for the following operations on CO-4
the following
list:
L = [1, 2, 3, 4, 5, 6, 7, 8, 9]
1. Return a list of numbers starting from the last to second item of the list
f)
2. Return a list that start from 3rd item to second last item.
3. Return a list that has only even position elements of list L to list M.
4. Return a list that starts from the middle of the list L.
5. Return a list that reverses all the elements starting from element at
index
Create a Python program to read a text file and do following: CO-4
1. Print no. of lines
g)
2. Print no. of unique words
3. Store each word with its occurrence in dictionary
====================